Sign in to follow this  
charlando

SDL problem

Recommended Posts

Intro: Hello, i'm charlando and i'm new here but i've been arround a lot. I am having trouble with the SDL lib and i can't figure it out. I'm using Dev-C++ 4.9.9.2 and i was trying to install SDL. I followed the tutorial here: http://lazyfooproductions.com/SDL_tutorials/lesson01/windows/devcpp/index.php but i got an error. The contents of the compiler log looks like this: Compiler: Default compiler Building Makefile: "C:\Projects\SDLtut\Makefile.win" Executing make... make.exe -f "C:\Projects\SDLtut\Makefile.win" all make.exe: Circular Main <- Main.o dependency dropped. g++.exe -c Main -o Main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" g++.exe: Main: linker input file unused because linking not done g++.exe Main.o -o "SDL_Tutorial.exe" -L"C:/Dev-Cpp/lib" -mwindows -lmingw32 -lSDLmain -lSDL g++.exe: Main.o: No such file or directory make.exe: *** [SDL_Tutorial.exe] Error 1 Execution terminated edit: accidently posted log twice. If anyone can help, please do. If your gonna call me stupid... >.> [Edited by - charlando on August 18, 2006 9:36:11 AM]

Share this post


Link to post
Share on other sites
No clue what this means
make.exe: Circular Main <- Main.o dependency dropped.

I've never tried working with SDL but you could also try for now only using -lSDL as a flag.

Share this post


Link to post
Share on other sites
Quote:
Original post by PumpkinPieman
No clue what this means
make.exe: Circular Main <- Main.o dependency dropped.

I've never tried working with SDL but you could also try for now only using -lSDL as a flag.


well, main.cpp is the name of the file with the code in it.

I changed "-lmingw32 -lSDLmain -lSDL" into "-lSDL" and i got:

Compiler: Default compiler
Building Makefile: "C:\Projects\SDLtut\Makefile.win"
Executing make...
make.exe -f "C:\Projects\SDLtut\Makefile.win" all
make.exe: Circular Main <- Main.o dependency dropped.

g++.exe -c Main -o Main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

g++.exe: Main: linker input file unused because linking not done

g++.exe Main.o -o "SDL_Tutorial.exe" -L"C:/Dev-Cpp/lib" -mwindows -lSDL

g++.exe: Main.o: No such file or directory

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

Execution terminated

to my inexperienced eyes it looks kinda the same...

Share this post


Link to post
Share on other sites
Quote:
Original post by charlando
Quote:
Original post by PumpkinPieman
No clue what this means
make.exe: Circular Main <- Main.o dependency dropped.

I've never tried working with SDL but you could also try for now only using -lSDL as a flag.


well, main.cpp is the name of the file with the code in it.


Well, take a look at mine.

Compiler: Default compiler
Building Makefile: "E:\LyradisEngine\projects\devcpp\Makefile.win"
Executing make...
make.exe -f "E:\LyradisEngine\projects\devcpp\Makefile.win" all
windres.exe -i Lyradis_private.rc --input-format=rc -o ./output//Lyradis_private.res -O coff

g++.exe -D__DEBUG__ ./output//irenderer.o ./output//rendererd3d.o ./output//main.o ./output//rendererogl.o ./output//image.o ./output//fileio.o ./output//input.o ./output//wingame.o ./output//statemanager.o ./output//statemenu.o ./output//statetitle.o ./output//statemenuopen.o ./output//statemenuoptions.o ./output//statemenucredits.o ./output//stategame.o ./output//physicsmanager.o ./output//drawmanager.o ./output//quadmanager.o ./output//xml.o ./output//xmlresourceloader.o ./output//Lyradis_private.res -o "..\..\bin\Lyradis.exe" -L"C:/Dev-Cpp/lib" -ld3d9 -lglu32 -lopengl32 -lwinmm -ldsound -ldinput8 -ld3dx9 -ld3d9 -ld3dxof -ldxguid -ldxtrans -lphysfs -lfreeimage -ltinyxml -lflatland ../../lib/libgdi32.a -g3

Execution terminated
Compilation successful




I don't know what a Circular Main is, but it seems as if it either didn't compile main.o or deleted it. Which would definatly make g++.exe throw an error like g++.exe: Main.o: No such file or directory.

try trouble shooting by commenting out the SDL methods

Share this post


Link to post
Share on other sites
Quote:
Original post by PumpkinPieman
try trouble shooting by commenting out the SDL methods


sorry, i don't understand... I'm not very good with this debugging :p

Share this post


Link to post
Share on other sites
Try this. In Project properties under the parameters tab, make sure you have


-lmingw32 -lSDLmain -lSDL


in the linker tab

And in the Compiler tab put this:


-Dmain=SDL_main


That is what I would put when I used Dev with SDL, and I could use it just fine

Hope that helps.

Chad.

Share this post


Link to post
Share on other sites
i added that, but the new error is:

Quote:
Compiler: Default compiler
Building Makefile: "C:\Projects\SDLtut\Makefile.win"
Executing make...
make.exe -f "C:\Projects\SDLtut\Makefile.win" all
make.exe: Circular Main <- Main.o dependency dropped.

g++.exe -c Main -o Main.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include"

g++.exe: Main: linker input file unused because linking not done

g++.exe Main.o -o "SDL_Tutorial.exe" -L"C:/Dev-Cpp/lib" -mwindows -lmingw32 -lSDLmain -lSDL

g++.exe: Main.o: No such file or directory

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

Execution terminated

:/

Share this post


Link to post
Share on other sites
mmm. I am not sure if this will work, but I did have a problem like that one time with Dev, and what I did was rebuild all. I believe the hotkey for rebuild all is crtl+F11. Like I said, I doubt that will work but I did have a problem similar to yours and I just did rebuild all and it worked.


Now, after you install SDL via from a devpak, there should be a SDL Template Project made in the MultiMedia section where you create a New Project. If you click that for the new project do you still get that error?


Chad

Share this post


Link to post
Share on other sites

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