VC ++ LNK1000 incremental linking error

Disclaimer: I'm a C # guy with little or no experience with VS C ++ / MFC.

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

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

My Link.exe version: 9.00.30729.1

The line of code running this is pretty simple:

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

When I remove the gcnew stuff and just hard-code the string in place everything compiles correctly.

Along the way, this leads to a large number of messages stating that this issue has been fixed with kb948127, which is included in VS2008 SP1. I have verified that I have this specific fix installed. I've also verified that incremental linking is disabled with the / INCREMENTAL: NO setting, but I'm still experiencing an error every time I compile.

Is there a parameter or switch I'm missing? Has anyone encountered this type of problem before?

+2


a source to share


2 answers


I am having linker errors by modifying the code to use marshal_as convert to create a System :: String ^, but I don't understand what actually caused the linker error from source.

Here is the line I changed:



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

+3


a source


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)

      



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

$ 0.02

0


a source







All Articles