Search code examples
c++visual-studio-2010visual-c++static-linking

C++ Visual Studio 2010 not linking native static library


I am converting a C++ Visual Studio 2005 project to Visual Studio 2010, and I have used this guide in the process. I have one issue left which is, that the linker does not link a native static library (it is not a .NET assembly but a third part library sqsapi32.lib). I have included the library sqsapi32.lib in the Properties->Configuration Properties->Linker->Input->Additional Dependencies, but the linker keep notifying the following warning:

warning LNK4248: unresolved typeref token (01000014) for 'SQLDA'; image may not run

running the .exe file produces the following error: "The program can't start because sqsapi32.dll is missing from your computer".

How can I fix this? It worked using Visual Studio 2005.


Solution

  • The warning and the error you've shown aren't necessarily linked (no pun intended!).

    To get around the error, ensure the sqsapi32.dll is placed in the same location as the exe you're trying to run.

    Good luck,