How can I get rid of the __imp__ prefix in the linker in VC++?

The __imp__ prefix appears whenever you are linking to a DLL. It does not appear when linking to statically linked libraries. Most likely the code is generated to be linked against a DLL import lib, but you have linked it with a static lib instead.

The prefix is added when you mark the imported function with __declspec(dllimport) – make sure your imports are not using this when not linking against a DLL.

Leave a Comment