Jump to content

  • Log In with Google      Sign In   
  • Create Account


Codeblocks Setup with SDL


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 nyl2000   Members   -  Reputation: 129

Like
0Likes
Like

Posted 17 June 2012 - 07:06 AM

I am trying to setup Code::Blocks to use SDL. I have all the libraries setup per this tutorial.

http://lazyfoo.net/S...ocks/index.php

I am currently getting this error:

File ld.exe cannot find -lSDLmain


I know the code works; I have had my comp reformatted recently, and have taken the code from a backup. I believe that there is a step that I have forgotten in reinstalling Code::Blocks and SDL. Can anyone explain to me what this error is exactly, so I have a better idea of what to look for?

Sponsor:

#2 Sik_the_hedgehog   Crossbones+   -  Reputation: 1608

Like
0Likes
Like

Posted 17 June 2012 - 07:18 AM

Isn't it -lSDL_main? (note the underscore)

I should go check, to be fair I haven't used that thing in ages since with MinGW you can use main as-is without being forced to open a console and I'm on Linux right now anyway.
Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#3 nyl2000   Members   -  Reputation: 129

Like
0Likes
Like

Posted 17 June 2012 - 07:33 AM

I just tried -lSDL_main, it doesnt work either; plus I remember -lSDLmain working from before I reformatted.

#4 Dauntless-v2   Members   -  Reputation: 125

Like
0Likes
Like

Posted 17 June 2012 - 11:40 AM

The error message you are getting is indicating that the linker (ld.exe) can't find a library (SDLmain.dll). I am not familiar with CodeBlocks, but see if there is a way to put in search directories that contain your libraries. The other possibility is that when you built/installed libSDL, it didn't create or put SDLmain.dll in a "well known" location (for example, in linux, a well known location is usually /usr/local/lib, /usr/lib or /opt/lib)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS