Compiling and linking with OSX frameworks

General questions regarding the usage of CodeLite
yiplite
CodeLite Curious
Posts: 8
Joined: Mon Nov 24, 2008 3:30 am
Contact:

Compiling and linking with OSX frameworks

Post by yiplite »

Does anyone know how to specify to CodeLite the frameworks required for compiling and linking? I've tried to use -F/System/Library/Frameworks as both compiler and linker options, but gcc/g++ doesn't seem to be able to find the header files in the frameworks. Specifically, the openGL frameworks. Any tips would be appreciated.
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Compiling and linking with OSX frameworks

Post by eranif »

Not really a CodeLite question ;)

I am not very familiar with Mac, however, I looked at the link line produced by wx-config tool, and it looks like you need:

Code: Select all

-framework OpenGL
For every toolkit which exist under /System/Library/Framework/, you simply add:

Code: Select all

-framework <framework_name>
This can be added in project settings -> linker -> options
Eran
Make sure you have read the HOW TO POST thread
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: Compiling and linking with OSX frameworks

Post by frank_frl »

Hi yiplite,

I use OpenGl on Mac with this linker options.

Code: Select all

`$(WXWIN)/GCCBuildReleaseMacUnicode/wx-config --inplace --exec-prefix="$(WXWIN)/GCCBuildReleaseMacUnicode" --libs --gl-libs` -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
So to use OpenGl, you just have to add '--gl-libs' to your linker options.

Frank
yiplite
CodeLite Curious
Posts: 8
Joined: Mon Nov 24, 2008 3:30 am
Contact:

Re: Compiling and linking with OSX frameworks

Post by yiplite »

Thanks guys,
I've got it figured out. Still wondering why gluPerspective can't be found, but that's for a different forum altogether. 8-)
Post Reply