Sign in to follow this  

linking problem

This topic is 3814 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
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

This topic is 3814 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this