Mingw32-g++.exe: error > openFrameworks.lib: No such file or directory

Code::Blocks 10.05 (rev 6283) on Windows 7
with Ming-gw (codeblocks-10.05mingw-setup.exe, 27 May 2010) from http://www.codeblocks.org/downloads/5

Trying to build the emptyExample and running into this error:

  
-------------- Build: release in emptyExample ---------------  
  
Compiling: src\main.cpp  
Compiling: src\testApp.cpp  
Compiling: icon.rc  
Linking console executable: bin\emptyExample.exe  
mingw32-g++.exe: error: ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib: No such file or directory  
Process terminated with status 1 (0 minutes, 10 seconds)  
0 errors, 0 warnings  

My …/…/…/libs/openFrameworksCompiled/lib directory is definitely empty.
How do i compile?

can you try installing Code::Blocks 12.11 (w/ mingw) which includes the newest mingw / gcc. I’m not sure what the error is exactly, but you def have to have the latest gcc for the newer versions of OF.

Also that error may happen when you open directly the CBP, if the ofx lib hasn’t been compiled previously. Always open the *.workspace file to avoid that error.

2 Likes

Thanks. The OF Lib compiled indeed, after opening the project via the .workspace file.
After that, compiling the project still came up with errors

ld.exe||cannot find -lstrmbase|
ld.exe||cannot find -lz|

But i am about to give it a try with codeblocks-12 now.

Sidenote
The code::blocks setup page http://www.openframeworks.cc/setup/codeblocks/ in step a) show a screenshot of the cb-12 download site, while the link above still links you to cb-10. Easy to miss that when not paying attention …

thanks for the note – will fix the site.

for the errors you are seeing, be sure to follow step (e) here:

http://www.openframeworks.cc/setup/codeblocks/

it’s definitely related to those files being missing.

I had to copy the dependent files also into my already existing MinGW directory. As the PATH environmental variable is pointing at it, i imagine codeblocks checks there first, before it checks in its own internal MinGW directory.

Now i am on codeblocks 12.11

When building the emptyExample, it runs into a range of undefined reference errors with the poco library. A quick online search suggests that these errors could be due to trying to mix libraries compiled with different compilers.

BUILD LOG

  
  
-------------- Build: release in openFrameworksLib (compiler: GNU GCC Compiler)---------------  
  
Target is up to date.  
  
-------------- Build: release in emptyExample (compiler: GNU GCC Compiler)---------------  
  
mingw32-g++.exe  -o bin\emptyExample.exe obj\Release\src\main.o obj\Release\src\testApp.o  obj\Release\icon.res  -s ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib  ..\..\..\libs\FreeImage\lib\win_cb\FreeImage.lib ..\..\..\libs\rtAudio\lib\win_cb\librtaudio.a ..\..\..\libs\quicktime\lib\win_cb\qtmlClient.lib ..\..\..\libs\cairo\lib\win_cb\libcairo.a ..\..\..\libs\cairo\lib\win_cb\libpixman-1.a ..\..\..\libs\freetype\lib\win_cb\libfreetype.a ..\..\..\libs\glut\lib\win_cb\libglut.a ..\..\..\libs\glfw\lib\win_cb\libglfw3.a ..\..\..\libs\videoInput\lib\win_cb\videoInputLib.a ..\..\..\libs\fmodex\lib\win_cb\libfmodex.a ..\..\..\libs\glew\lib\win_cb\glew32s.lib ..\..\..\libs\glu\lib\win_cb\glu32.lib ..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a ..\..\..\libs\poco\lib\win_cb\libPocoCrypto.a ..\..\..\libs\poco\lib\win_cb\libPocoNet.a ..\..\..\libs\poco\lib\win_cb\libPocoUtil.a ..\..\..\libs\poco\lib\win_cb\libPocoXML.a ..\..\..\libs\poco\lib\win_cb\libPocoFoundation.a ..\..\..\libs\openssl\lib\win_cb\libssl.a ..\..\..\libs\openssl\lib\win_cb\libcrypto.a ..\..\..\libs\tess2\lib\win_cb\libtess2.a -lopengl32 -lgdi32 -lmsimg32 -lglu32 -ldsound -lwinmm -ldxguid -lstrmbase -lstrmiids -lz -luuid -lole32 -loleaut32 -lsetupapi -lwsock32 -lws2_32 -lIphlpapi -lComdlg32   
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized  
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `-defaultlib:LIBCMT ' unrecognized  
Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized  
Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x94c): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x974): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x990): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0xa18): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0xa33): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0xad7): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0xb02): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0xf98): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x10c7): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x10fd): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x11c3): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x11f9): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x12bf): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x12f5): more undefined references to `_Unwind_SjLj_Resume' follow  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x13aa): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x13d5): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x13fa): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x18a3): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x18f8): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1920): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1991): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1a86): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1abc): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1acc): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1af4): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1b65): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1c5a): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1c90): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1cae): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1cd9): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x1cfe): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x21a7): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x2224): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x224c): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x22bd): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x23b2): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x23e8): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x23f8): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x2420): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x2491): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x2586): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x25bc): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x25de): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x260f): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x2636): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x3f2b): undefined reference to `_Unwind_SjLj_Resume'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x40fc): undefined reference to `__gxx_personality_sj0'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x4124): undefined reference to `_Unwind_SjLj_Register'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x418b): undefined reference to `_Unwind_SjLj_Unregister'  
..\..\..\libs\poco\lib\win_cb\libPocoNetSSL.a(SSLManager.o):SSLManager.cpp:(.text+0x428c): undefined reference to `_Unwind_SjLj_Resume'  
Process terminated with status 1 (5 minutes, 2 seconds)  
50 errors, 17 warnings (5 minutes, 2 seconds)  
   

did you compile the OF library with the newer codeblocks? It sounds like maybe you compiled it with the older CB, but are compiing this example with the newer CB. Can you to clean everything and rebuild?

  • zach

I am pretty sure i cleaned and rebuild a couple of times. But i’ll give it another try.
Thanks for being so responsive on this!

No luck. Same result.

I was having what I believe was this same problem and seem to have fixed it by going to project > build settings > linker settings and copying the path (win_cb/openFrameworks.lib) in “other linker options” to “link libraries”.

Thanks for the suggestion, but that didn’t produce any change in my setup.

I assume you are referring to the error mentioned in the first post? Or the one further down (poco lib related)?

what does your settings->compiler->toolchain executables say for the “compilers installation directory” ? It should be something like C:/program files/CodeBlocks/MinGW – can you check that this is the version of MINGW that comes with codeblocks you’ve downloaded (12.11)? Please be sure to download the newest CB with mingw, and to make sure this is pointing to the right place. It sounds like you have a compiler mis-match happening, it would be good to know where.

I was referring to the one with the Poco errors. I had generated a project with the default settings in projectGenerator.exe, then added openFrameworks.lib to the link libraries part as stated, then compiled and ran it successfully.

After, I copied all the folders inside examples/ into apps/ and was able to run most of the examples (except emptyExample) without changing anything. Have you tried any of the other examples?

emptyExample gives me these now:

  
obj\Release\src\main.o:main.cpp:(.text$_ZN9ofBaseApp15messageReceivedER9ofMessage[__ZN9ofBaseApp15messageReceivedER9ofMessage]+0x8c): undefined reference to `_Unwind_Resume'  
obj\Release\src\main.o:main.cpp:(.text$_ZN9ofBaseApp7draggedER10ofDragInfo[__ZN9ofBaseApp7draggedER10ofDragInfo]+0x16d): undefined reference to `_Unwind_Resume'  
obj\Release\src\main.o:main.cpp:(.text$_ZN9ofBaseApp7draggedER10ofDragInfo[__ZN9ofBaseApp7draggedER10ofDragInfo]+0x1a7): undefined reference to `_Unwind_Resume'  
obj\Release\src\main.o:main.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'  
obj\Release\src\testApp.o:testApp.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'  

Compile Success! :slight_smile:

My settings->compiler->toolchain-executables->compilers-installation-directory was pointing at my own external MinGW directory. When i pointed it at the CodeBlocks MinGW directory, all was fine.

Running gcc -v with commandline inside the CodeBlocks MinGW directory, revealed it its gcc version 4.7.1 (tdm-1), while my other MinGW install had an older version: gcc version 4.6.2 (GCC).

Very glad this mystery is solved. Thank you!!

sweet! for future reference, there’s a small click through when you install CB, where it tried to scan your hard drive and find other compilers to work with and I think at that moment, you can make sure it doesn’t pick a local install of mingw (ie, C:/mingw). It’s a bit too smart for it’s own good :slight_smile:

Thanks! It worked for me. I am at the beginning, and the whole day trying to compile emptyExample before.

i got following error
Trying to build the emptyExample and running into this error:

-------------- Build: release in emptyExample ---------------

Compiling: src\main.cpp
Compiling: src\testApp.cpp
Compiling: icon.rc
Linking console executable: bin\emptyExample.exe
mingw32-g++.exe: error: …/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib: No such file or directory
Process terminated with status 1 (0 minutes, 10 seconds)
0 errors, 0 warnings