codeblocks project on mac

hi ppl.

sorry, i am not really sure where to post this.
there is a xcode and a codeblocks (windows) forum, but no dedicated mac or codeblocks (mac) forum … :wink:

i’d like to use codeblocks with OF on mac. CB works fine - i.e. building templated glut examples, etc.

but i can’t build any openframeworks samples bc there are no proper build files.
so i was trying to compare linux-codeblocks-project-files with codeblocks-on-mac-template-project-files, get info from xcode-projects and merge it into my current project file. now everything compiles but i get linker errors.


Undefined symbols:
“SeqGrabberModalFilterUPP(OpaqueDialogPtr*, EventRecord const*, short*, long)”, referenced from:
__Z24SeqGrabberModalFilterUPPP15OpaqueDialogPtrPK11EventRecordPsl$non_lazy_ptr in ofVideoGrabber.o
“GetSettingsPreference(__CFString const*, UserDataRecord***)”, referenced from:
ofVideoGrabber::loadSettings() in ofVideoGrabber.o
“SaveSettingsPreference(__CFString const*, UserDataRecord**)”, referenced from:
ofVideoGrabber::saveSettings() in ofVideoGrabber.o
“closeQuicktime()”, referenced from:
ofExitCallback() in ofAppRunner.o
“convertPixels(unsigned char*, unsigned char*, int, int)”, referenced from:
ofVideoGrabber::grabFrame() in ofVideoGrabber.o
“initializeQuicktime()”, referenced from:
ofVideoGrabber::ofVideoGrabber()in ofVideoGrabber.o

i am not an experienced mac developer, so i am also not good at reading such messages or finding hints on google/ADC/…
i guess it has something todo with quicktime, but i already linked to “-framework QuickTime”.
what is missing? any defines maybe?
i would like to know if anybody tried this before and maybe also succeeded?!?

thx
didi

hi didi,

I am super curious about this too, because we really like CB on pc / linux. can you upload a zip of a small OF package (libs and app) and I’ll look at it.

take care!
zach

Hi!

I’m also very interested in what you came up with didi? Did you upload the project somewhere? What has been happening on this topic? Anybody got OF running on CB/OSX?

/cj

hi cj,

sorry for not replying. i totally forget about this one. i think jesus also wants to know it.
i finally solved it back then. but codeblocks is still a bit annoying on macosx (layout).

i used the linux codeblocks package (of_preRelease_v0.05_linux_cb_FAT) not the xcode one. the ABI should be compatible with macosx/unix.
i am not sure anymore but i think i borrowed the static libs (*.a) and the dynamic libs (*.dylib instead of *.so) from the macosx-xcode project.
the one and only dynamic lib (fmodex) also needs to be put into the bin directory.
i am not sure about the mac frameworks - if i really need all of them - but now it works. another important thing are the defines for the preprocessor.
here is my project file (*.cbp):

  
  
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>  
<CodeBlocks_project_file>  
	<FileVersion major="1" minor="6" />  
	<Project>  
		<Option title="myprojecttile" />  
		<Option pch_mode="2" />  
		<Option compiler="gcc" />  
		<Option virtualFolders="libs/;src/;libs/openframeworks/;libs/openframeworks/app/;libs/openframeworks/communication/;libs/openframeworks/graphics/;libs/openframeworks/sound/;libs/openframeworks/utils/;libs/openframeworks/video/;libs/openframeworks/video/src/;libs/openframeworks/addons/;" />  
		<Build>  
			<Target title="Debug">  
				<Option output="bin/myapp_debug" prefix_auto="1" extension_auto="1" />  
				<Option working_dir="bin" />  
				<Option object_output="obj/Debug/" />  
				<Option type="1" />  
				<Option compiler="gcc" />  
				<Compiler>  
					<Add option="-w" />  
					<Add option="-Wfatal-errors" />  
					<Add option="-W" />  
					<Add option="-Wall" />  
					<Add option="-g" />  
					<Add option="-DDEBUG" />  
					<Add option="-D_DEBUG" />  
				</Compiler>  
			</Target>  
			<Target title="Release">  
				<Option output="bin/myapp" prefix_auto="1" extension_auto="1" />  
				<Option working_dir="bin" />  
				<Option object_output="obj/Release/" />  
				<Option type="1" />  
				<Option compiler="gcc" />  
				<Compiler>  
					<Add option="-DNDEBUG" />  
					<Add option="-march=prescott" />  
					<Add option="-O3" />  
					<Add option="-O2" />  
					<Add option="-w" />  
					<Add option="-Wfatal-errors" />  
					<Add option="-W" />  
				</Compiler>  
				<Linker>  
					<Add option="-s" />  
				</Linker>  
			</Target>  
		</Build>  
		<Compiler>  
			<Add option="-Wall" />  
			<Add option="-fexceptions" />  
			<Add option="-D__MACOSX_CORE__" />  
			<Add option="-D__APPLE_CC__" />  
			<Add option="-DTARGET_OSX" />  
			<Add option="-DOF_VIDEO_PLAYER_QUICKTIME" />  
			<Add option="-DOF_VIDEO_CAPTURE_QUICKTIME" />  
			<Add directory="../../../addons/" />  
			<Add directory="../../../libs/openFrameworks/" />  
			<Add directory="../../../libs/openFrameworks/app" />  
			<Add directory="../../../libs/openFrameworks/communication" />  
			<Add directory="../../../libs/openFrameworks/graphics" />  
			<Add directory="../../../libs/openFrameworks/video" />  
			<Add directory="../../../libs/openFrameworks/utils" />  
			<Add directory="../../../libs/openFrameworks/sound" />  
			<Add directory="../../../libs/rtAudio" />  
			<Add directory="../../../libs/fmodex/inc" />  
			<Add directory="../../../libs/glee/include" />  
			<Add directory="../../../libs/glee/" />  
			<Add directory="../../../libs/freeimage/include" />  
			<Add directory="../../../libs/FreeImage" />  
			<Add directory="../../../libs/freetype/include" />  
			<Add directory="../../../libs/freetype/include/freetype2" />  
			<Add directory="../../../libs/freetype/include/freetype2/freetype" />  
			<Add directory="../../../libs/freetype/include/freetype2/freetype/cache" />  
			<Add directory="../../../libs/freetype/include/freetype2/freetype/config" />  
			<Add directory="../../../libs/freetype/include/freetype2/freetype/internal" />  
			<Add directory="/usr/include" />  
			<Add directory="/usr/include/GL" />  
		</Compiler>  
		<Linker>  
			<Add option="-framework CoreServices" />  
			<Add option="-framework CoreFoundation" />  
			<Add option="-framework ApplicationServices" />  
			<Add option="-framework Carbon" />  
			<Add option="-framework Foundation" />  
			<Add option="-framework AppKit" />  
  
  
			<Add option="-framework GLUT" />  
			<Add option="-framework OpenGL" />  
			<Add option="-framework AGL" />  
			<Add option="-framework CoreVideo" />  
			<Add option="-framework QuickTime" />  
			<Add option="-framework QTKit" />  
			<Add option="-framework AudioToolbox" />  
			<Add option="-framework CoreAudio" />  
			<Add library="freetype" />  
			<Add library="freeimage" />  
			<Add library="rtAudio" />  
			<Add library="GLee" />  
			<Add library="libfmodex" />  
			<Add directory="../../../libs/fmodex/lib" />  
			<Add directory="../../../libs/freetype/lib/" />  
			<Add directory="../../../libs/GLee/lib" />  
			<Add directory="../../../libs/freeimage/lib" />  
			<Add directory="../../../libs/rtAudio/lib" />  
		</Linker>  
		<Unit filename="../../../addons/ofAddons.h">  
			<Option virtualFolder="libs/openframeworks/addons/" />  
		</Unit>  
		<Unit filename="src/main.cpp">  
			<Option virtualFolder="src/" />  
		</Unit>  
		<Unit filename="src/testApp.cpp">  
			<Option virtualFolder="src/" />  
		</Unit>  
		<Unit filename="src/testApp.h">  
			<Option virtualFolder="src/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/app/ofAppGlutGlue.h">  
			<Option virtualFolder="libs/openframeworks/app/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/app/ofAppRunner.cpp">  
			<Option virtualFolder="libs/openframeworks/app/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/app/ofAppRunner.h">  
			<Option virtualFolder="libs/openframeworks/app/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/app/ofSimpleApp.h">  
			<Option virtualFolder="libs/openframeworks/app/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/FBOTexture.h" />  
		<Unit filename="../../../libs/openFrameworks/graphics/FBOtexture.cpp" />  
		<Unit filename="../../../libs/openFrameworks/graphics/ofGraphics.cpp">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofGraphics.h">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofImage.cpp">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofImage.h">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofShader.cpp">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofShader.h">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofTexture.cpp">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofTexture.h">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofTrueTypeFont.cpp">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/graphics/ofTrueTypeFont.h">  
			<Option virtualFolder="libs/openframeworks/graphics/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/ofMain.h">  
			<Option virtualFolder="libs/openframeworks/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/utils/ofConstants.h">  
			<Option virtualFolder="libs/openframeworks/utils/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/utils/ofMath.cpp">  
			<Option virtualFolder="libs/openframeworks/utils/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/utils/ofMath.h">  
			<Option virtualFolder="libs/openframeworks/utils/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/utils/ofTypes.h">  
			<Option virtualFolder="libs/openframeworks/utils/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/utils/ofUtils.cpp">  
			<Option virtualFolder="libs/openframeworks/utils/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/utils/ofUtils.h">  
			<Option virtualFolder="libs/openframeworks/utils/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/video/ofQtUtils.cpp">  
			<Option virtualFolder="libs/openframeworks/video/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/video/ofQtUtils.h">  
			<Option virtualFolder="libs/openframeworks/video/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/video/ofVideoGrabber.cpp">  
			<Option virtualFolder="libs/openframeworks/video/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/video/ofVideoGrabber.h">  
			<Option virtualFolder="libs/openframeworks/video/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/video/ofVideoPlayer.cpp">  
			<Option compile="0" />  
			<Option link="0" />  
			<Option virtualFolder="libs/openframeworks/video/" />  
		</Unit>  
		<Unit filename="../../../libs/openFrameworks/video/ofVideoPlayer.h">  
			<Option virtualFolder="libs/openframeworks/video/" />  
		</Unit>  
		<Extensions>  
			<code_completion />  
			<envvars />  
			<debugger />  
		</Extensions>  
	</Project>  
</CodeBlocks_project_file>  
  
  

a gcc make file should be easy with this.

btw, the initial problem was a stupid. i forgot to compile/link the ofQT* and ofVideo files.

*hth*
didi