Cant compile SDL source file with gcc

0

i downloaded a manual of introduction to graphics programming with SDL, so i tried to compile my first source and it logged the next error

the command to compile it was:

$ gcc helloWorld.c [-o helloWorld] $(sdl-config --cflags --libs)

and the log is:

gcc: error: [-o: No such file or directory
gcc: error: helloWorld]: No such file or directory

user2843739

Posted 2013-10-10T14:13:13.847

Reputation: 21

Answers

0

Do not use [ brackets ] in the command. Try this:

$ gcc helloWorld.c -o helloWorld $(sdl-config --cflags --libs)

Kevin Panko

Posted 2013-10-10T14:13:13.847

Reputation: 6 339

Please select the check mark next to this answer if it solved your problem. – Kevin Panko – 2013-10-10T15:34:50.500