error LNK2001 Unresolved extern symbol in jucelib_static_win

For Windows specific issues

error LNK2001 Unresolved extern symbol in jucelib_static_win

Postby JuceNewbie » Mon May 31, 2010 7:33 pm

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
Code: Select all
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
JuceNewbie
JUCE Geek
 
Posts: 25
Joined: Tue Apr 20, 2010 7:00 pm

Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

Postby jules » Tue Jun 01, 2010 9:14 am

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.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

Postby JuceNewbie » Tue Jun 01, 2010 9:37 am

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))
Code: Select all
/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
Code: Select all
/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
JUCE Geek
 
Posts: 25
Joined: Tue Apr 20, 2010 7:00 pm

Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

Postby JuceNewbie » Tue Jun 01, 2010 10:09 am

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

DEBUG linker flags (functioning)
Code: Select all
/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)
Code: Select all
/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"
JuceNewbie
JUCE Geek
 
Posts: 25
Joined: Tue Apr 20, 2010 7:00 pm

Re: error LNK2001 Unresolved extern symbol in jucelib_static_win

Postby jules » Tue Jun 01, 2010 10:25 am

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.
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK


Return to Windows

Who is online

Users browsing this forum: No registered users and 0 guests