Static linking on Windows with VS2013


#1

Hi,
I’ve succeeded linking on Linux but run into difficulties on Windows. I’d like to use static linking such that end-users don’t have to install VS redistributables. I’m using VS 2013 from a command prompt.

The sample program is downloaded; VS 12 libs are placed in the example-folders. The defines for static linking are activated in Sample.cpp.

The compiler is called with "cl Sample.cpp x64/LexActivator.lib x64/libcurl_MD.lib /MD /Fe:sample.exe /link /ltcg
This fails with 7 unresolved externals: __imp_SHGetFolderPathW, __imp_GetMessagePos, etc.

Are there additional libraries needed for linking?


#2

Hi Edwin,

Following should help: