SDL problem

Started by
9 comments, last by charlando 17 years, 8 months ago
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]
Advertisement
Since you're using Dev-CPP have you tried getting the library from the webupdate?

Tools->Check for updates\packages->(Server)Devpak.org->(category)SDL
I did what you said, i downloaded SDL from the updates window, but i get the same error it seems.
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.
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...
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 compilerBuilding Makefile: "E:\LyradisEngine\projects\devcpp\Makefile.win"Executing  make...make.exe -f "E:\LyradisEngine\projects\devcpp\Makefile.win" allwindres.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 terminatedCompilation 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
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
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.
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

:/
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

This topic is closed to new replies.

Advertisement