Author Topic: SDL problemo  (Read 3879 times)

kafka

  • Guest
SDL problemo
« on: March 06, 2008, 02:46:57 pm »
Ok, so. I just downloaded codeblocks, and I installed SDL manually. Now that I put the commands to the linker (-lmingw32 -lSDLmain -lSDL) and try to compile, it gives me this message:
Code
F:\Ohjelmat\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libmingw32.a(main.o):main.c:(.text+0x104)||undefined reference to `_WinMain@16'|
I dont understand what did I do wrong...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SDL problemo
« Reply #1 on: March 06, 2008, 04:06:36 pm »
I dont understand what did I do wrong...
You didn't searched this and any SDL forum. It's annoyning to answer the same question over and over again. :?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

kafka

  • Guest
Re: SDL problemo
« Reply #2 on: March 06, 2008, 04:36:38 pm »
Searched, but I didn't find post that is about my problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: SDL problemo
« Reply #3 on: March 06, 2008, 06:26:28 pm »
Look at this post, similar error, should have related solution.

Tim S

http://forums.codeblocks.org/index.php/topic,4135.0.html
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SDL problemo
« Reply #4 on: March 06, 2008, 09:48:28 pm »
Searched, but I didn't find post that is about my problem.
I  can't believe this should be true. Searching for SDL in our forums revealed
http://wiki.codeblocks.org/index.php/Using_SDL_with_Code::Blocks
as one of the first hits.

Searching with google for "undefined reference to WinMain SDL" revealed ~1400 hits.

No more to say except that if we have more questions like that in the forum we can cease development on C::B and just help with basic programming issues over and over again. That's why I am reacting like this.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ