Compiling errors w/ sdl
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
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
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
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)
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)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement