SDL Digest, Vol 1, Issue 1167

Hello,
Thanks for the note. I dug more into the documents on the web and read
the FAQs again. Under Mac OSX there is nothing written about compiling
SDL programs from command line. Under the linux I found a bit. I have
tried to compile using the instructions and for some reason my compiler
can’t find SDL.h. It is included at the top of my driver program and
the file is with the rest of the files in usr/local/include/SDL. Here
is my compilation command and the error:

gcc -o test test.c sdl-config --cflags --libs

test.c:1: header file ‘SDL.h’ not found
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode

I think this is part of a bigger problem. I was able to install the
SDL.pkg for use with Project Builder and all of the .framework files
were in place but the only way Project Builder would ever recognize SDL
as an option when I created a new project was if I was logged into my
root account and running Project Builder there. This is unacceptable
and why I decided to try the command line approach. I have tried
uninstalling and reinstalling many times with no success. If anyone has
any ideas PLEASE tell me.
Thanks
Daniel RobertsOn Monday, May 17, 2004, at 07:49 AM, sdl-request at libsdl.org wrote:

I just installed sdl on my mac osx from the command line using
./config, make, and make install. No problems. All of the include
files
and friends are where they should be in usr/local/lib. However I don’t
know how to use the makefiles provided. I have always just used one
plain Makefile when using tool kits like this. The accompanying
makefiles are .am and .in. They are also extremely long and I don’t
think I should need them for my own projects. The documentation on
actually getting SDL to compile with your code is nonexistent. Can
someone please send me or point me to a sample makefile I would need
to
use SDL in my code? I would really appreciate it. Also I have no idea
what config files I need in my code’s directory. Is there a place I
can
find out all of this stuff? I only see explanations on using SDL
functions in the documentation. Not info on compiling and requisite
files. I would really appreciate some feedback.

There’s a section on using SDL in various environments in the FAQ.
Is there something in particular that needs to be more clear?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hello,
Thanks for the note. I dug more into the documents on the web and read
the FAQs again. Under Mac OSX there is nothing written about compiling
SDL programs from command line. Under the linux I found a bit. I have
tried to compile using the instructions and for some reason my compiler
can’t find SDL.h. It is included at the top of my driver program and
the file is with the rest of the files in usr/local/include/SDL. Here
is my compilation command and the error:

gcc -o test test.c sdl-config --cflags --libs

You’re supposed to put backquotes around “sdl-config --cflags --libs” so that the line is rather :
gcc -o test test.c sdl-config --cflags --libs

Stephane