User forums > Help

C::B+SDL+undefined reference to 'WinMain@16'

<< < (2/2)

Albenejean:
http://www.libsdl.org/faq.php?action=listentries&category=4#58

SplinterOfChaos:
So where is it I paste "-lmingw32 -lSDLmain -lSDL -mwindows" (assuming I understood).

I tried putting it in compiler and settings->global compiler settings->toolchain executables->program files: c++ compiler (after the "mingw32-g++.exe"), but it didn't work.

EDIT
Got it. Needed to put it there, except at the linker box.

Albenejean:

--- Quote ---I tried putting it in compiler and settings->global compiler settings->toolchain executables->program files: c++ compiler (after the "mingw32-g++.exe"), but it didn't work.

EDIT
Got it. Needed to put it there, except at the linker box.
--- End quote ---

No, no... Poject->Build options->Linker and add SDLmain and SDL. And don't forget to tell your compiler where the files are located.

SplinterOfChaos:
I'd already done all that.

But it worked so I don't care! In fact, my product worked on someone else's computer EASILY and without the full week of debugging that Visual C++ took, and unsuccessfully!

Navigation

[0] Message Index

[*] Previous page

Go to full version