Sign in to follow this  

Compiling errors w/ sdl

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

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