error LNK2001 Unresolved extern symbol in jucelib_static_win

5 posts / 0 new
Last post
JuceNewbie
Offline
Last seen: 4 years 4 weeks ago
Joined: 20 Apr 2010 - 19:00
error LNK2001 Unresolved extern symbol in jucelib_static_win

Hi there

Not strictly a Juce Problem, but I guess others have come across this.

I can compile a DEBUG version of my code. When trying to build a RELEASE version, it finally fails (after many, many improvements) with

2>jucelib_static_win32.lib(juce_win32_NativeCode.obj) : error LNK2001: Unresolved extern symbol "_GetFileVersionInfoW@16".
2>jucelib_static_win32.lib(juce_win32_NativeCode.obj) : error LNK2001: Unresolved extern symbol "_VerQueryValueW@16".
2>jucelib_static_win32.lib(juce_win32_NativeCode.obj) : error LNK2001: Unresolved extern symbol "_GetFileVersionInfoSizeW@8".
2>zlib.lib(gvmat32c.obj) : error LNK2001: Unresolved extern symbol "_longest_match_686".
Here I couldn't make progress in three hours, so I better start asking other people.

Any ideas?
I use Visual C++2008 Express Edition.
Appreciate any hints...
Cheers

jules
Offline
Last seen: 3 hours 24 min ago
Joined: 29 Apr 2013 - 18:37
Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

How did you generate your VS project? If you created it by hand, there's probably just some setting that's incorrect in release mode. Hard to guess what it might be from that information though.

JuceNewbie
Offline
Last seen: 4 years 4 weeks ago
Joined: 20 Apr 2010 - 19:00
Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

jules wrote:
How did you generate your VS project? If you created it by hand, there's probably just some setting that's incorrect in release mode. Hard to guess what it might be from that information though.

Here are the bloody details. Don't think it will help though.

Compiler flags (should be unimportant as the error is a linker error (LNK2001))
/Od /I "../internlib" /I "../libs/libharu-2.1.0/include" /I "../libs/libharu-2.1.0/win32/include" /I "../calc" /I "../libs/juce/bin" /I "../libs/zlib-1.2.4" /I "C:/Programme/Microsoft SDKs/Windows/v6.0A/Lib" /D "_MBCS" /FD /EHsc /MT /Fo"Release\\" /Fd"Release\vc90.pdb" /W0 /nologo /c /TP /errorReport:prompt
Linker flags
/OUT:"Win32Release\Graph.exe" /NOLOGO /LIBPATH:"../haru/Debug" /LIBPATH:"../haru" /LIBPATH:"C:/Programme/Microsoft SDKs/Windows/v6.0A/Lib" /MANIFEST /MANIFESTFILE:"Release\Graph.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /NODEFAULTLIB:"LIBCMT.lib" /OPT:NOREF /OPT:NOICF /LTCG /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..\libs\zlib-1.2.4\projects\visualc6\win32_lib_debug\zlibd.lib" "..\debug\haru.lib" "..\debug\internlib.lib" "..\libs\juce\bin\jucelib_static_win32_debug.lib"
Seems that a library can't be found/linked. Microsoft's Version.Lib?? (But that one I included in various ways.)
After several hours I am a little bit lost.

JuceNewbie
Offline
Last seen: 4 years 4 weeks ago
Joined: 20 Apr 2010 - 19:00
Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

Additional to my post above, here are the functiong debug Linker flags compared to the release flags.

DEBUG linker flags (functioning)

/OUT:"Win32Debug\Graph.exe" 
/NOLOGO 
/LIBPATH:"../haru" 
/LIBPATH:"../haru/Debug" 
/MANIFEST 
/MANIFESTFILE:"Debug\Graph.exe.intermediate.manifest" 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" 
/DEBUG 
/PDB:"c:\Data\Projects\project-data\Graph\Win32Debug\Graph.pdb" 
/DYNAMICBASE:NO 
/MACHINE:X86 
/ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..\libs\zlib-1.2.4\projects\visualc6\win32_lib_asm_release\zlib.lib" "..\release\haru.lib" "..\release\internlib.lib" "..\libs\juce\bin\jucelib_static_win32.lib"

RELEASE linker flags (error LNK2001)
/OUT:"Win32Release\Graph.exe" 
/NOLOGO 
/LIBPATH:"../haru/Release" 
/LIBPATH:"../haru" 
/LIBPATH:"C:/Programme/Microsoft SDKs/Windows/v6.0A/Lib" 
/MANIFEST 
/MANIFESTFILE:"Release\Graph.exe.intermediate.manifest" 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" 
/NODEFAULTLIB:"LIBCMT.lib" 
/OPT:NOREF 
/OPT:NOICF 
/LTCG 
/DYNAMICBASE:NO 
/MACHINE:X86 
/ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "..\libs\zlib-1.2.4\projects\visualc6\win32_lib_asm_release\zlib.lib" "..\release\haru.lib" "..\release\internlib.lib" "..\libs\juce\bin\jucelib_static_win32.lib"
jules
Offline
Last seen: 3 hours 24 min ago
Joined: 29 Apr 2013 - 18:37
Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

Well, you've got a whole bunch of your own 3rd party libs being used there, and any of them could be causing conflicts or problems. I'm afraid I can only really help with juce specific questions.