MSVC 2008 - Unresolved External errors with LIB but only with DLL, not with EXE project

Posted by Robert Oschler on Stack Overflow See other posts from Stack Overflow or by Robert Oschler
Published on 2010-04-04T16:47:54Z Indexed on 2010/04/04 16:53 UTC
Read the original article Hit count: 454

Filed under:
|
|
|
|

I have a DLL that I am trying to link with a libjpeg LIB using MSVC 2008 that is generating Unresolved External Symbol errors for the libjpeg functions. I also have a test project that links with the exact same libjpeg library file and links without error and runs fine too.

I have triple-checked my LIB path and dependent LIBS list settings and literally copy and pasted them from the EXE project to the DLL project. I still get the errors. I do have the libjpeg include headers surrounded by extern "C" so it is not a name mangling issue and the unresolved external warnings show the "missing" libjpeg functions as undecorated (just a leading underscore and the @ sign parameter byte count suffix after each name).

What could make the linker with the DLL project be unable to find the functions properly when the test EXE project has no trouble at all? I'm using the pre-compiled 32-bit static multi-threaded debug library which I downloaded from ClanLib.

Thanks, Robert

© Stack Overflow or respective owner

Related posts about unresolved

Related posts about external