Codebench and SDL

3 posts / 0 new
Last post
BandiT
BandiT's picture
Offline
Last seen: 4 years 6 months ago
Joined: 2012-01-10 11:24
Codebench and SDL

Hi guys, hopefully someone can help me. I have recently installed codebench and want to set up SDL so I can have a go at some SDL tutorials and then maybe come up with a new SDL based creation. I have installed the official hyperion SDK and also installed the latest SDL "SDL-1.2.13-SVNr37-sdk.lha" from google code page.

I have added the SDL path to the "Project Information Window -> Compiler Paths" in codebench. The compiler name is g++, with standard switches -Wall -Werror -Wwrite-strings. When I try to build a simple program that just creates a SDL window and then closes it comes up with errors, can't find SDL.h. I knwo the code works, it compiled on visual studio fine.
I normally use MS Visual C++, so im new to OS4 and also not used to using gcc/g++ or make files. Any help would be appreciated.

Thanks
Anthony

salass00
salass00's picture
Offline
Last seen: 2 months 1 week ago
Joined: 2011-02-03 11:27
I have added the SDL path to


I have added the SDL path to the "Project Information Window -> Compiler Paths" in codebench. The compiler name is g++, with standard switches -Wall -Werror -Wwrite-strings. When I try to build a simple program that just creates a SDL window and then closes it comes up with errors, can't find SDL.h. I knwo the code works, it compiled on visual studio fine.

Either add "-I/SDK/local/common/include/SDL" to your compiler options or include "SDL/SDL.h" instead of "SDL.h" in your code.

BandiT
BandiT's picture
Offline
Last seen: 4 years 6 months ago
Joined: 2012-01-10 11:24
Thanks that did the trick. I

Thanks that did the trick. I also hadn't added libSDLmain and libSDL as linker objects in the project window.

But all good now!

Log in or register to post comments