Can't link JUCE with msvc2005 pro


#1

Hello there,

I recently switched from msvc 2003 to msvc 2005 pro, but actually I can’t link juce to my project:

jucelib_static_debug.lib(juce_String.obj) : error LNK2019: unresolved external symbol _wcsicmp referenced in function "public: bool __thiscall juce::String::equalsIgnoreCase(wchar_t const * const)const " (?equalsIgnoreCase@String@juce@@QBE_NQB_W@Z)
jucelib_static_debug.lib(juce_String.obj) : error LNK2019: unresolved external symbol _wcsnicmp referenced in function "public: int __thiscall juce::String::indexOfIgnoreCase(wchar_t const * const)const " (?indexOfIgnoreCase@String@juce@@QBEHQB_W@Z)
jucelib_static_debug.lib(juce_XmlDocument.obj) : error LNK2001: unresolved external symbol _wcsnicmp
jucelib_static_debug.lib(juce_String.obj) : error LNK2019: unresolved external symbol _wcsupr referenced in function "public: class juce::String const __thiscall juce::String::toUpperCase(void)const " (?toUpperCase@String@juce@@QBE?BV12@XZ)
jucelib_static_debug.lib(juce_String.obj) : error LNK2019: unresolved external symbol _wcslwr referenced in function "public: class juce::String const __thiscall juce::String::toLowerCase(void)const " (?toLowerCase@String@juce@@QBE?BV12@XZ)
jucelib_static_debug.lib(juce_Line.obj) : error LNK2001: unresolved external symbol _hypot
jucelib_static_debug.lib(juce_ColourGradient.obj) : error LNK2001: unresolved external symbol _hypot
jucelib_static_debug.lib(juce_Graphics.obj) : error LNK2019: unresolved external symbol _hypot referenced in function "float __cdecl hypotf(float,float)" (?hypotf@@YAMMM@Z)
jucelib_static_debug.lib(juce_Path.obj) : error LNK2001: unresolved external symbol _hypot
jucelib_static_debug.lib(juce_PathStrokeType.obj) : error LNK2001: unresolved external symbol _hypot
jucelib_static_debug.lib(juce_MouseEvent.obj) : error LNK2001: unresolved external symbol _hypot

I tried googling for those but didn’t find any information. What’s the problem ?


#2

There seems to be a pattern as both wcsnicmp() and hypot() are deprecated in Visual C++ 2005.

The relevant (but highly uninformative) MSDN links are the following:
http://msdn2.microsoft.com/en-US/library/ms235324.aspx and http://msdn2.microsoft.com/en-US/library/ms235360.aspx

However, this shouldn’t prevent you from linking with JUCE. I assume you’ve compiled JUCE with the same compiler; maybe some link option is needed…


#3

hey thank you ! I actually changed all the hypot, wcsnicmp, wcsnicmp, wcsupr, wcslwr occurences within the juce code and now it works fine :smiley:

I’m not sure this is compatible with the others compilers, maybe jules could take a look and do the proper fix to respect the ISO C++ standard (so that msvc2005 pro won’t complain) ?


#4

groan… ok, I’ll have a look at this.


#5