Jump to content
  • Advertisement
Sign in to follow this  
godsenddeath

linking problem

This topic is 4029 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

sorry to bug ya with somethin so simple, but i recently switched computers, and when i try to link SDL, i get "undefined reference to 'SDL_main'". i'm using code blocks and i have mingw32 SDL SDLmain SDL_image i tried changing SDLmain to SDL_main but then i get "cannot find '-lSDLmain'" i also tried redownloading the SDL libraries and headers anyone have an idea?

Share this post


Link to post
Share on other sites
Advertisement
nevermind, i'm an idiot, i didn't have a main function, i was just testing the function definitions, i wasn't aware there had to be a main function

thanks for hte help though

Share this post


Link to post
Share on other sites
It does matter what order you define your dependencies because one may depend on something in the other which has not been defined yet.

How are you creating your main entry point when using SDL you need to declare main with the following parameters:

int main(int argc, char* argv[])

Thats all i can think of right now.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!