Makefile troubles

Started by
14 comments, last by Kwizatz 15 years, 7 months ago
Since you can't compile the sample from the tutorial then there may be a problem with your installation of MinGW. You said that you didn't install MinGW to the default location (C:\minGW). Does the path to the minGW folder have a space in it? The MinGW install instruction say that it has problems with paths containing spaces.

If thats not the problem I would recommend reinstalling MinGW to the default location and try again.
Advertisement
Also use Slash (/) as directory delimiter in your #include clauses instead of backslash (\).
Quote:Original post by Amnesia
If thats not the problem I would recommend reinstalling MinGW to the default location and try again.


-_-; it...worked...almost... :s All the genius that went into GCC and it's felled by white space...

*sigh* Well, the reason I said almost is I'm still getting error messages like "undefined reference to '_glGetString@4'". I've been at this all day and Googling has gotten me no where. Linking GL-related libraries is getting me no where (gl32, glu32, glut32, opengl32, glaux, not in that order). Any one have ANY thing for me?

Quote:Original post by Kwizatz
try

g++ main.cpp -ISDL -lmingw32 -lSDLmain -lSDL -mwindows

or

g++ main.cpp -Ic:/mingw/include/SDL -lmingw32 -lSDLmain -lSDL -mwindows

Though, you should really separate compilation and linking into 2 separate steps.


I'd rather have it work first. But, the makefile at the end will be much more sophisticated... if it ever fricken compiles.
Quote:Original post by Splinter of Chaos
Linking GL-related libraries is getting me no where (gl32, glu32, glut32, opengl32, glaux, not in that order). Any one have ANY thing for me?


You mean -lopengl32 -lglu32 after -lSDL does nothing at all? you may be missing some mingw packages if not, the winapi I think.
So, even though it's and OpenGL problem, it might actually be a winapi problem? I actually did have everything working up until now, but I decided I wanted to clean up my resources (because I had many copies of many thrid-party libraries in many, many different places on my computer), but after deciding to delete and reinstall everything is when I'm not having trouble.

So, what can I do? How do I know what I need and how do I get it?
Quote:Original post by Splinter of Chaos
So, even though it's and OpenGL problem, it might actually be a winapi problem? I actually did have everything working up until now, but I decided I wanted to clean up my resources (because I had many copies of many thrid-party libraries in many, many different places on my computer), but after deciding to delete and reinstall everything is when I'm not having trouble.

So, what can I do? How do I know what I need and how do I get it?


Its not a winapi problem, but if I am not mistaken the OpenGL libraries are in the Mingw winapi package, the weird thing is that you manage to compile the code, usually headers and libraries are packaged together, so, without access to your computer I can only guess.

do a search for libopengl32.a and libglu32.a, if not found, that's the problem, download and install the MinGW package which contains them, if you find them, then feed the directory that contains them with -Lc:/path/to/libs to the linker (L must be uppercase).

This topic is closed to new replies.

Advertisement