Reputation: 13
I have a project that we are looking to port from Visual studio 6 to Visual Studio 2010.
The project relies on a 3rd party .LIB file that is pre-compiled. This 3rd party library only contains the .H header files (no .CPP files)
I have just done a quick imprt into a visual studio 2010 solution and I am getting lots of errors at link time!
Some of these errors refer to the 3rd party .lib file "ServerToolkitRuntimeLIB.LIB"
Here is small snippit from the output of my build:
1>ServerToolkitRuntimeLIB.LIB(SerialIO.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)
1>ServerToolkitRuntimeLIB.LIB(OPCConversions.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)
1>ServerToolkitRuntimeLIB.LIB(OPCMemoryAS.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)
1>ServerToolkitRuntimeLIB.LIB(OPCAddressSpace.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)
1>ServerToolkitRuntimeLIB.LIB(OPCServer.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)
Am I at a loose end here without the source to rebuild the 3rd party library or could there be something else going on here?
Thank you in advance.
EDIT: The 3rd party .lib was originally compiled in Visual Studio 6.0
Upvotes: 1
Views: 660
Reputation: 3660
If you have VS6 you could try to produce a DLL there, linking to that .lib file you have, and exporting the necessary symbols.
Then you could link that dll dynamically in your VS 2010 project without using the .lib
Upvotes: 1
Reputation: 6914
Your 3rd party library depend on some internal implementation of VS6 that removed from VS2010, so normally you can't use it without the source, but there is a tricky way of using it.
Usually this implementation functions are all open source in VS6, you can see its implementation and implement your own version and link against it, if simple link does not solve the problem you should compile your implementations as a separate DLL and link against it!
Upvotes: 0