Kevin Klute
Kevin Klute

Reputation: 458

SDL and g++ always produces error?

I think i have SDL installed properly but i couldn't find a way to check like import Pygamein python. I am using Ubuntu 13.04. This is the header in my C++ code #include "SDL/SDL.h". When i run g++ -Test -o "testcode" "lesson02.cpp" in the code's directory i get /usr/bin/ld: cannot open linker script file est: No such file or directory. I am trying to follow lazy Foo's tutorial but compiling isn't really covered and I'm lost. Do i need to write something else in my compile command to include SDL? Is SDL not installed properly? Is there something wrong with my include line?

Upvotes: 0

Views: 145

Answers (2)

You should add -lsdl to your g++ options.

EDIT : real solution was removing -Test option, because g++ treats this as "load script file named est".

Upvotes: 1

lewisjb
lewisjb

Reputation: 686

Add -lSDL at the end of your compile code

Upvotes: 1

Related Questions