LNK1000 error when building resource-only DLLs

D

Dan Smith

I frequently get a LNK1000 error when building a resource-only DLL. If I
rebuild, the problem usually goes away.

Thanks,
Dan

------ Build started: Project: vaac_startupUIRes, Configuration: Debug
Win32 ------

Linking...
LINK : fatal error LNK1000: Internal error during ProcessResFiles

Version 7.00.9466

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 00465F2C (00400000) "C:\Program Files\Microsoft
Visual Studio .NET\Vc7\bin\link.exe"
NumberParameters = 00000002
ExceptionInformation[ 0] = 00000001
ExceptionInformation[ 1] = 00000004
CONTEXT:
Eax = 00000001 Esp = 0012F710
Ebx = 00000000 Ebp = 00000001
Ecx = 00C45040 Esi = 4000734C
Edx = 00142F0E Edi = 00C49E08
Eip = 00465F2C EFlags = 00010202
SegCs = 0000001B SegDs = 00000023
SegSs = 00000023 SegEs = 00000023
SegFs = 00000038 SegGs = 00000000
Dr0 = 0012F710 Dr3 = 00000000
Dr1 = 00000001 Dr6 = 00C45040
Dr2 = 00000000 Dr7 = 00000000

Build log was saved at "file://...\Debug\BuildLog.htm"
vaac_startupUIRes - 1 error(s), 0 warning(s)
 
D

David Lowndes

I frequently get a LNK1000 error when building a resource-only DLL. If I
rebuild, the problem usually goes away.

Dan,

I think many of us have seen LNK1000 errors occasionally - usually
with no reliable way of reproducing them.

Have you checked normal transient type problems such as low disk space
on your temp folder drive?

Any AntiVirus scanner running - you could try disabling it.

Dave
 
T

Tian Min Huang

Hi Dan,

I agree with David's reply.

In addition, according to MSDN documentation on LNK1000, you may get this
error if you mix standard header files (for example, dos.h) and your own
files. #include the standard headers first, followed by your own header
files.

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
D

Dan Smith

I've got plenty of disk space, and I've already disabled anti-virus. Other
developers also have the same problem...

I think it's interesting that this is only for resource-only DLLs.

Dan
 
D

Dan Smith

This only occurs for a resource-only DLL, and a very simple ones at that -
no (minimal) header-file stuff.

Dan
 
D

David Lowndes

I've got plenty of disk space, and I've already disabled anti-virus. Other
developers also have the same problem...

I think it's interesting that this is only for resource-only DLLs.

That does seem odd, but you also said that it happens frequently - how
frequently? 1 in every 2 builds, 1 in 10, or 1 in 100?

Dave
 
D

Dan Smith

I'd say about 1 in 2 or 1 in 3 builds. This is all from the IDE, and a
rebuild usually fixes the problem, so it's more of a nusiance than anything
else.

In the meantime, I've added /incremental:no since the default of "yes" makes
no sense for resource-only DLLs.

Dan
 
D

David Lowndes

I'd say about 1 in 2 or 1 in 3 builds.

OK, that's much more frequent than I've ever experienced.

Do you have a minimal project that reproduces the problem that you
could share so that others can try to reproduce it?
In the meantime, I've added /incremental:no since the default of "yes" makes
no sense for resource-only DLLs.

Has that made any difference to the occurrences of the problem?

Dave
 
D

Dan Smith

Things seem to be working much better with /incremental:no; I'll post a
sample project if that turns out not to be the case.

Dan
 
T

Tian Min Huang

Hi Dan,

Thanks for your information.

As you know, LNK1000 is acutally a linker crash. If the problem is caused
by the incremental linking, it may be caused by what described in the
following KB article:

FIX: "Fatal Error LNK1105" Error Message When You Incrementally Link Large
Projects
http://support.microsoft.com/?id=329593

In addition, I recommend you add a "/verbose" flag to your link options and
view the KB article below. It will be very helpful if you can provide a
reprodicible sample project.

HOWTO: Get Info for Troubleshooting Compiler & Linker Problems
http://support.microsoft.com/?id=134650

Please feel free to let me know if you have any problem sor concerns.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top