Hello again gurus, I have compiled some external C++ code into a dll, thirdpartycode.dll, using Visual Studio 2008. The code is wrapped in extern "C".
Since I am cross compiling, creating a 64 bit dll on my 32 bit machine; I am using x64 as "Active solution platform" in the "Configuration Manager".
My thirdpartycode.dll compiles and links successfully. Next I want to create another dll containing code that calls the thirdpartycode.dll: wrapper.dll. As the name indicates it is a wrapper simplifying certain calls to a complex API inside thirdpartycode.dll. I then plan to call wrapper.dll from a C# program.
My problem however is that when I try to link my wrapper.dll, I get unresolved symbols :-(. For each function in thirdpartycode.dll, e.g. "func1"; I get an unresolved external symbol "__imp_func1". Using Dependency Walker I verify that thirdpartycode.dll indeeed does export "func1".
I DO list thirdpartycode.lib in "Additional dependencies". I have turned on /VERBOSE and can see that thirdpartycode.lib is searched.
If I repeat this whole process but using x86 as "Active solution platform" things works just fine!?
Any ideas what is going wrong?
Where does the _imp prefix come from? It is a bit confusing, since for troubleshooting I would compare exported symbols from thirdpartycode.dll using Dependency Walker with needed symbols from wrapper.obj using dumpbin.
Thanks in advance for any answers!