Build error with Code::Blocks

Hi at all , i’m starting to use Open Frameworks cause university thesis. I just install Code::Blocks following the guide http://openframeworks.cc/setup/codeblocks/ . Next i follow another guide to compile an Example.http://openframeworks.cc/setup/codeblocks/ . But when i run the example it can’t compile, giving to me the following error :
-------------- Build: release in graphicsExample (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -o bin\graphicsExample.exe obj\Release\src\main.o obj\Release\src\ofApp.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
c:/program files (x86)/codeblocks/mingw/bin/…/lib/gcc/mingw32/4.7.1/…/…/…/…/mingw32/bin/ld.exe:…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib: file format not recognized; treating as linker script
c:/program files (x86)/codeblocks/mingw/bin/…/lib/gcc/mingw32/4.7.1/…/…/…/…/mingw32/bin/ld.exe:…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib:10: syntax error
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
1 error(s), 0 warning(s) (0 minute(s), 1 second(s))


So my OS is windows 8.1 64 bit, the version of code::blocks is the last : codeblocks-13.12mingw . What i can do to resolve? Thanks !

OF is not yet compatible with codeblocks 13.12, you’ll need to download 12.11 as is specified in the setup guide

I try to install different version of code:blocks but i have ever the same error on building phase.
-------------- Build: release in graphicsExample (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -o bin\graphicsExample.exe obj\Release\src\main.o obj\Release\src\ofApp.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
c:/program files (x86)/codeblocks/mingw/bin/…/lib/gcc/mingw32/4.7.1/…/…/…/…/mingw32/bin/ld.exe:…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib: file format not recognized; treating as linker script
c:/program files (x86)/codeblocks/mingw/bin/…/lib/gcc/mingw32/4.7.1/…/…/…/…/mingw32/bin/ld.exe:…/…/…/libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib:10: syntax error
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)

can you try deleting libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib and opening the project using the .workspace file instead of the .cbp

ok! Now it compiles but program doesn’t open the window…

-------------- Build: release in openFrameworksLib (compiler: GNU GCC Compiler)---------------

ar.exe -r -s …\lib\win_cb\openFrameworks.lib obj\Release\openFrameworks\3d\of3dPrimitives.o obj\Release\openFrameworks\3d\of3dUtils.o obj\Release\openFrameworks\3d\ofCamera.o obj\Release\openFrameworks\3d\ofEasyCam.o obj\Release\openFrameworks\3d\ofMesh.o obj\Release\openFrameworks\3d\ofNode.o obj\Release\openFrameworks\app\ofAppGLFWWindow.o obj\Release\openFrameworks\app\ofAppGlutWindow.o obj\Release\openFrameworks\app\ofAppRunner.o obj\Release\openFrameworks\communication\ofArduino.o obj\Release\openFrameworks\communication\ofSerial.o obj\Release\openFrameworks\events\ofEvents.o obj\Release\openFrameworks\gl\ofFbo.o obj\Release\openFrameworks\gl\ofGLProgrammableRenderer.o obj\Release\openFrameworks\gl\ofGLRenderer.o obj\Release\openFrameworks\gl\ofGLUtils.o obj\Release\openFrameworks\gl\ofLight.o obj\Release\openFrameworks\gl\ofMaterial.o obj\Release\openFrameworks\gl\ofShader.o obj\Release\openFrameworks\gl\ofTexture.o obj\Release\openFrameworks\gl\ofVbo.o obj\Release\openFrameworks\gl\ofVboMesh.o obj\Release\openFrameworks\graphics\of3dGraphics.o obj\Release\openFrameworks\graphics\ofBitmapFont.o obj\Release\openFrameworks\graphics\ofCairoRenderer.o obj\Release\openFrameworks\graphics\ofGraphics.o obj\Release\openFrameworks\graphics\ofImage.o obj\Release\openFrameworks\graphics\ofPath.o obj\Release\openFrameworks\graphics\ofPixels.o obj\Release\openFrameworks\graphics\ofPolyline.o obj\Release\openFrameworks\graphics\ofRendererCollection.o obj\Release\openFrameworks\graphics\ofTessellator.o obj\Release\openFrameworks\graphics\ofTrueTypeFont.o obj\Release\openFrameworks\math\ofMath.o obj\Release\openFrameworks\math\ofMatrix3x3.o obj\Release\openFrameworks\math\ofMatrix4x4.o obj\Release\openFrameworks\math\ofQuaternion.o obj\Release\openFrameworks\math\ofVec2f.o obj\Release\openFrameworks\math\ofVec4f.o obj\Release\openFrameworks\sound\ofFmodSoundPlayer.o obj\Release\openFrameworks\sound\ofRtAudioSoundStream.o obj\Release\openFrameworks\sound\ofSoundPlayer.o obj\Release\openFrameworks\sound\ofSoundStream.o obj\Release\openFrameworks\types\ofBaseTypes.o obj\Release\openFrameworks\types\ofColor.o obj\Release\openFrameworks\types\ofParameter.o obj\Release\openFrameworks\types\ofParameterGroup.o obj\Release\openFrameworks\types\ofRectangle.o obj\Release\openFrameworks\utils\ofFileUtils.o obj\Release\openFrameworks\utils\ofLog.o obj\Release\openFrameworks\utils\ofMatrixStack.o obj\Release\openFrameworks\utils\ofSystemUtils.o obj\Release\openFrameworks\utils\ofThread.o obj\Release\openFrameworks\utils\ofURLFileLoader.o obj\Release\openFrameworks\utils\ofUtils.o obj\Release\openFrameworks\utils\ofXml.o obj\Release\openFrameworks\video\ofDirectShowGrabber.o obj\Release\openFrameworks\video\ofQtUtils.o obj\Release\openFrameworks\video\ofQuickTimeGrabber.o obj\Release\openFrameworks\video\ofQuickTimePlayer.o obj\Release\openFrameworks\video\ofVideoGrabber.o obj\Release\openFrameworks\video\ofVideoPlayer.o
ar.exe: …\lib\win_cb\openFrameworks.lib: File format not recognized
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)

i fixed the pacakge in the web yesterday can you try downloading it again?

1 Like

ok now it works!!! :wink: thank you very much!! :slight_smile: :slight_smile: :slight_smile:

Hello. I’m having problems with Cairo too. I’m using Ubunt 14.04 and downgraded Codeblocks to 12.11, but still not finding Cairo.

I get this error

Found following issues with libraries:

Didn't found configuration for libraries:  * cairo  * glew  * gstreamer-0.10  * gstreamer-app-0.10  * gstreamer-base-0.10  * gstreamer-video-0.10  * gtk+-2.0  * libmpg123  * libudev  * openal
Would you like to go to detection dialog ?

And also:

../../../libs/openFrameworks/graphics/ofCairoRenderer.h|4|fatal error: cairo-features.h: No such file or directory|

Obviously, I had run “install_dependencies.sh”.

I checked this thread: Compilation fails on cairo-features.h and others

My

pkg-config cairo --cflags

Gives:

-I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15

If I try to “make” in the folder of the app, the error is different than in CodeBlocks:

    In file included from src-UserAndCloud-Simple/testApp.cpp:1:0:
src-UserAndCloud-Simple/testApp.h:4:23: fatal error: ofxOpenNI.h: No such file or directory
 #include "ofxOpenNI.h"
                       ^
compilation terminated.
make[1]: *** [obj/linux64/Release/src-UserAndCloud-Simple/testApp.o] Error 1
make[1]: Leaving directory `/home/milton/Desktop/of_v0.8.1_linux64_release/examples/OF_Kinect_Tutorials-master/opeNI-SimpleExamples'
make: *** [Release] Error 2

What am I missing?

Thanks!

are you using 0.8.1? there was a change in some library that stopped linux from compiling but it’s fixed in 0.8.1

also there’s no need to downgrade to codeblocks 12.11, in linux the latest version works fine

Arturo,

Thank you for the reply!
I am using of_v0.8.1_linux64_release. But I still have the problem. Maybe I should add something to the “linux64/makefile”?
Or maybe it is because Ubuntu 14.04?

pd: It’s good to be back to Codeblocks 13.12. The previous one gave a lot of dependency problems on the apt-get.

yes it seems to be including old libraries, try running the project generator pointing it to the project, it will update it, don’t forget to add all addons that you are using

Thank you Arturo (again…).

Using the project generator solved *the cairo * problem (though the openNI example refuses to work anyway).
I had copied the make files from the empty project before, but it appears that the project generator changes more things than that.

Anyway, thank you!