I recently got assigned to a c++ project, although I am not a c++ developer. I was provided Visual Studio 2010 Professional as IDE. So I gave it a shot.
I am to write a c++ dynamic library (*.dll) which wraps two static libraries (*.lib). The static libraries are third party libraries we bought a couple of years ago from another company. Using the dumpbin /header ...
cmd call, I can say that both static libraries have the following file header value:
14C machine (x86)
I got this task working for the Win32 solution platform. I added the header files and the libraries to the project. The libraries are included by writing two #pragma comment(lib, ...)
statements within the .cpp I need the functions in. Works like a charm. A sample function looks like this:
extern "C" void OURFreeStringBuf(Cm_StringBuf *sbuf)
{
FreeStringBuf(sbuf); // the call to the static library
}
This dynamic library is to be used in x64 architectures, aswell. So I tried to set the solution platform to x64. Now I get the following error for each call of one of the static libraries' functions (no code changes or other configuration changes were made):
error LNK2001: unresolved external symbol "..."
followed by a summarizing error:
error LNK1120: 29 unresolved external links
Could these errors be the result of trying to link x86 lib files in a x64 dll? Is there any chance to complete this task using the provided static libraries?
Thank you very much in advance.