开发者

VC++ Incremental Linker Error LNK1000

Disclaimer: I am a C# guy with vi开发者_如何学运维rtually no VS C++/MFC experience.

I am trying to get some projects built on my machine that are mixed C++/.Net. When compiling a C++ project via the command line on my machine I am getting this error:

LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage [SOURCE_CODE_PATH_TO_VCPROJ]

My version of Link.exe is : 9.00.30729.1

The line of code that is triggering this is pretty simple:

System::String^ fullPath = gcnew System::String(dllpath);

When I ditch the gcnew stuff and just hardcode a string in its place everything compiles correctly.

Googling this results in a lot of posts saying that this issue is fixed with kb948127 which is included in VS2008 SP1. I've verified that I have this particular hotfix installed. I've also verified that the incremental linking is disabled with the /INCREMENTAL:NO setting but I am still experiencing the error on every compile.

Is there a setting or switch that I am missing? Has anyone run into this type of issue before?


I've got the linker errors to go away by modifying the code to use marshal_as convert to create the System::String^ but I am not clear as to what actually triggered the linker error from the original code.

Here is the line I swapped out:

System::String^ fullPath = marshal_as( dllPath );


I got a similar error:

Linking...
TapCommandFormat.lib(CTapCommandDisplay.obj) : fatal error LNK1000: unknown error; consult documentation for technical support options

Error executing link.exe (tool returned code: 1000)

ITP - 1 error(s), 0 warning(s)

This turned out to be because my system ran out of virtual memory. I closed a huge document that was taking about 1.4GB of virtual memory, and the problem went away...

$0.02

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜