SDL, eclipse & MacOS X

Started by
16 comments, last by CaptNeo 15 years, 8 months ago
I think you misunderstand me...

Try changing the line to..

#import "/Network/Servers/coleman.informatik.RWTH-Aachen.DE/Volumes/RAID2/Hiwis/kurtz/Library/Frameworks/SDL.framework/Versions/A/Headers/SDL.h"

or..

#include "/Network/Servers/coleman.informatik.RWTH-Aachen.DE/Volumes/RAID2/Hiwis/kurtz/Library/Frameworks/SDL.framework/Versions/A/Headers/SDL.h"

Let me know if that works... It's not a neat solution, but will give us some info.

If it does then you have a couple of options. One is to keep a copy of SDL.h in your project and then you can just do an include "SDL.h".
Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
Advertisement
Thx again, sorry I really messed that up. In fact there is a new and informative error message now:

make all
Building target: SDL_OpenGL_test
Invoking: MacOS X C++ Linker
g++ -framework Cocoa -framework SDL /Users/Shared/Cpp_workspace/SDL_OpenGL_test/src/SDLMain.m -o "SDL_OpenGL_test" ./src/SDL_OpenGL_test.o
ld: framework not found SDL
collect2: ld returned 1 exit status
make: *** [SDL_OpenGL_test] Error 1

I don't have full admin permissions here, so I put the framework into my home directory.
Try putting the framework into your Framework directory.
If you do that then it should find it in that location as it's part of the default path.

If you want to keep it in your home directory you'll have to make that a valid search path for the linker to look into for stuff.

Make sense?

In other words a quick and dirty solution to make this work on your machine, is to put it into /Volumes/System/Library/Frameworks/

Then all apps will be able to load it on your machine at run time, and the linker should link with it as long as you include the framework with -framework as you are now.

A better solution is to put it inside your program's app bundle, but let's leave that for now to get you working.

I am not sure of your setup...
But, if you don't have permission to put into /Volumes/System/Library/Frameworks/ you can also put it into your Users Framework folder. This should be in ~/Library/
If it's not then make a Framework folder and put it in that.

Bottom line is that the Compiler, Linker and your program at runtime all need to know where to get the Framework from. :)
Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
The framework resides at "~/Library/Frameworks/SDL.framework" already. That was what I did in the first place. I also added that as Include path for the compiler (not for the linker as I was told, that one cant use -framework together with -l).
Ok..

Try putting -framework ~/Library/Frameworks/SDL
Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
Nope, still the same error (Thx for not giving up on me)
I must be missing something that I take for granted in XCode.

My gut feeling is that the linker has not had all it's search paths defined correctly.
I am assuming that ~/Library/Frameworks is a default search path for Frameworks.
It is certainly one place where apps look to load Frameworks from at launch.
Perhaps it's not being setup at build time, so try to set the header and framework paths in the command line and see if that helps...

I'll do some digging and if I have a brain wave I'll post back here.
Feel free to 'rate me down', especially when I prove you wrong, because it will make you feel better for a second....
Thx for the troubles, but I think I'll go with XCode and Objective C then. Wont hurt me that much to wrap my head around that Apple way of doing things. Thx again.

This topic is closed to new replies.

Advertisement