Jump to content
  • Advertisement
Sign in to follow this  
Cookiely

Compiling errors w/ sdl

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

Compiler: Default compiler Building Makefile: "D:\Game\Makefile.win" Executing make... make.exe -f "D:\Game\Makefile.win" all g++.exe test.o -o "Project1.exe" -L"D:/Dev-Cpp/lib" lmingw32 lSDLmain lSDL g++.exe: lmingw32: No such file or directory g++.exe: lSDLmain: No such file or directory g++.exe: lSDL: No such file or directory make.exe: *** [Project1.exe] Error 1 Execution terminated

Share this post


Link to post
Share on other sites
Advertisement
Thanks! that did something.


but now i'm getting this ...

Compiler: Default compiler
Building Makefile: "D:\Game\Makefile.win"
Executing make...
make.exe -f "D:\Game\Makefile.win" all
g++.exe -c test.cpp -o test.o -I"D:/Dev-Cpp/include/c++" -I"D:/Dev-Cpp/include/c++/mingw32" -I"D:/Dev-Cpp/include/c++/backward" -I"D:/Dev-Cpp/include" -ansi -pedantic -Wall

g++.exe test.o -o "Project1.exe" -L"D:/Dev-Cpp/lib" -lmingw32 -lSDLmain -lSDL

D:/Dev-Cpp/lib/libSDLmain.a(SDL_main.o.b)(.text+0x307): In function `console_main':
/home/hercules/release/SDL-1.2.4/src/main/SDL_main.c:227: undefined reference to `SDL_main'

make.exe: *** [Project1.exe] Error 1

Execution terminated

Share this post


Link to post
Share on other sites
SDL does some funky stuff with main
But your main needs to look like

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

and not

int main ()

And I think you need to add
-Dmain=SDL_main
to your compiler options (before linking)

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!