View Full Version : Problem with sdl opengl
vbuser1338
2005.08.12, 11:13 PM
Sorry if this is the wrong forum but this is the one I think it's best in. I am trying to set up an sdl-opengl window in cocoa but can't seem to get it to work. I added both the sdl and opengl frameworks to the project but it will not link them correctly. I get this error.
[Session started at 2005-08-12 22:05:58 -0400.]
ZeroLink: unknown symbol '_SDL_main'
Executable “SDL-OpenGL Base” has exited due to signal 6 (SIGABRT).
I tried turning off ZeroLink like it says to here (http://www.cs.brown.edu/courses/cs224/2005/g3d/guidemacosx.html) . But this does not work. If anyone can help I would really appreciate it.
Thanks vbuser
sealfin
2005.08.13, 04:07 AM
You need to have the files "SDLMain.m/.h" (installed by the SDL development package) in the project...
vbuser1338
2005.08.13, 10:56 AM
I do have those files installed. I copied the files to the folder of cocoa application and then added them to the project. The only thing I changed was
#include "Sdl.h" to #include <SDL/Sdl.h> because it could not find it. I do not know where it is finding the "Sdl.h" because there is no header in the project or one in the folder. They also don't have the framework added to the project. So I took it out of mine and then I also get the same error as I did before with _SDL_QUIT. But If I take that out I still get the _SDL_MAIN linker error. Does anyone know what I am forgetting?
Thanks,
vbuser
unknown
2005.08.13, 11:20 AM
You might want to try (as a last resort probably) install the sdl libraries from source as static and dynamic (.a and .dylib) instead of as frameworks, It what I did and works fine for SDL and SDL with OpenGL.
vbuser1338
2005.08.13, 11:32 AM
Thanks but I think I got it figured out. I am just going to create a new template from the one it has. I will just create a base with only the basics becuase they seem to set it up right. Then I will jsut put that in the project templates folder so that should work hopefully.
Thanks,
vbuser
unknown
2005.08.13, 11:36 AM
Thats what I had to do with the GLUT from the glut examples when I didnt know what was happening, If you look through the Targets inspector you should be able to find out whats missing in your version. Its better to know why there are problems.
vbuser1338
2005.08.13, 01:11 PM
Yes I have tried that and I can't seem to find out what I am missing. They don't seem to have the sdl framework added anywhere but they are not getting weird errors. Also what I can't figure out why is how they go #include "Sdl.h" instead of #include <SDL/Sdl.h> because that is the only place on the computer it is. I checked the searh paths for headers and it is not set to that file so I don't see how it is working.
Cya,
vbuser
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.