Check your C++ compiler arguments. I don't have the same problem - this works on my machine (VS 2008 SDK environment %ProgramFiles%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat):
cl.exe /Zi /FdHelloWorld.pdb /FeHelloWorld.exe HelloWorld.cpp "C:\Program Files\Microsoft SDKs\Windows\V6.0A\Include\corhlpr.cpp"
#include <stdio.h>
#include <corhlpr.h>
void main()
{
COR_ILMETHOD_DECODER d((COR_ILMETHOD *)NULL);
printf("Hello World");
}
Output (no errors): Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
HelloWorld.cpp corhlpr.cpp Generating Code... Microsoft (R) Incremental Linker Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved.
/debug /out:HelloWorld.exe HelloWorld.obj corhlpr.obj - Marked As Answer byRick ByersMSFT, OwnerTuesday, July 14, 2009 4:53 AM
-
All RepliesI thinkyou need to compile corhlpr.cpp in your application (%ProgramFiles%\Microsoft SDKs\Windows\V6.0A\Include\corhlpr.cpp) which contains the implementation. I don't think that any library exposes it for linking.
-Karel - Proposed As Answer byKarel ZikmundMSFT, ModeratorWednesday, July 08, 2009 1:45 AM
-
Thanks that helps some! That allows each of the .objs to resolve the symbol but my project is still complaining of an unresolved external symbol _DecoderInit (LNK2001). Any ideas for that?
|