juce_win32_AutoLinkLibraries.h and link errors


#1

Using VS2008 under Windows 7.

I was getting the following link error:

We don’t define DONT_AUTOLINK_TO_WIN32_LIBRARIES, so juce_win32_AutoLinkLibraries.h is included.
juce_win32_AutoLinkLibraries.h doesn’t seem to respect the build settings. For example when _DEBUG is defined, it would always link the comsupp.lib instead of comsuppwd.lib or comsuppd.lib.

I would advice to follow comdef.h:

[code]#ifdef _NATIVE_WCHAR_T_DEFINED

ifdef _DEBUG

pragma comment(lib, “comsuppwd.lib”)

else

pragma comment(lib, “comsuppw.lib”)

endif

#else

ifdef _DEBUG

pragma comment(lib, “comsuppd.lib”)

else

pragma comment(lib, “comsupp.lib”)

endif

#endif
[/code]

For now the workaround is to add comsupp.lib (and some of the the others) to the list of ignored libraries, or define DONT_AUTOLINK_TO_WIN32_LIBRARIES. Not a show-stopper, just annoying.


#2

Thanks for that, very interesting! I guess it should be doing whatever comdef.h does,I’ll have a look at that…