Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Trying to setup SDL with DevC++, please help?
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SpaceKiwi




PostPosted: Thu Dec 30, 2010 10:38 am   Post subject: Trying to setup SDL with DevC++, please help?

I just can't seem to get it to work.
Here are step-by-step instructions I've tried to follow:
http://lazyfoo.net/SDL_tutorials/lesson01/windows/devcpp/index.php
Which basically say to tell DevC++ to look in the include folder, and lib folder, of SDL, and to enter certain data in the linker parameters. I'm pretty sure I did it all correctly. So I load up one of SDL's included tests, (testwin.c to be exact) and try to compile and run, and recieve these errors:
    [Linker error] undefined reference to `__dyn_tls_init_callback'
    [Linker error] undefined reference to `__cpu_features_init'
    ld returned 1 exit status
    C:\Dev-Cpp\Makefile.win [Build Error] [Project1.exe] Error 1

Further more, when trying another test file, testsprite.c, I recieve (among many others) an error saying
    10 C:\SDL-1.2.14\test\testsprite.c SDL.h: No such file or directory.

However, there definitely is an SDL.h file.
I can't quite imagine what's wrong, so if anyone could help me get this working (and especially explain how you know how to get it working), I would be much appreciative. Smile

DevC++ version 4.9.9.2
SDL 1.2.14
Compiler is... whatever comes with or is used by DevC++?
Sponsor
Sponsor
Sponsor
sponsor
TerranceN




PostPosted: Thu Dec 30, 2010 2:12 pm   Post subject: RE:Trying to setup SDL with DevC++, please help?

I tried the tutorial and had no problems, maybe the samples used other libraries, just try the test code on the tutorial.

Also, I believe SDL.h is in the subdirectory of SDL's include folder called SDL. So your include line would look like #include "SDL/SDL.h"
SpaceKiwi




PostPosted: Fri Dec 31, 2010 2:07 pm   Post subject: Re: Trying to setup SDL with DevC++, please help?

That sure was the problem: The files are not within the include folder, but within a "SDL" folder inside the include folder. All I had to do was specify the include\SDL folder. Thanks for the help! Very Happy
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: