sqweek wrote on Tuesday, July 26, 2005:
> Hi, its me again!
Oh heya! Sorry for taking so long to get back to you, I forgot all about this thread and I didn’t get around to checking my e-mail until yesterday (ever since I started working I just don’t seem to have as much free time ). And then when I was typing up a response I went to type W but hit ctrl instead of shift so the tab closed >< (never thought I’d rue the day I turned capslock into another ctrl…)
>Do I need to use the compile.bat file which you get with glfw?
Well, like I said it’s been a while since I compiled glfw but I don’t believe it is necessary. At least, I don’t recall using it when I compiled under cygwin (which should be fairly similar to MinGW).
> You, sqweek, said “make win32.mgw”. How does it know, where I have installed MinGW?
It’s part of setting up the command-line MinGW - you alter the PATH environment variable to include MinGW’s bin/ directory. See step 3 of http://csjava.occ.cccd.edu/~gilberts/mingw/
> Why did the author of GLFW not include these files into the GLFW package?
My best guess would be binary compatibility, but that’s probably just because it’s foreign to me (are the object/library files created by MSVC compatible with the same created by BORLAND CC? Or MinGW GCC? What the hell is a .lib file anyway? Just a renamed .a or somewhat different?).
At the crux of your issue is GNU. Which stands for GNU’s Not Unix (don’t think about it too long…).I’m no guru on the matter but I get the impression that before mice and Windows and even DOS, some blokes (bloke?) got fed up with licensing issues in the UNIX world and said ‘LET THERE BE GNU’. And GNU, the free computing development environment was born, and life was good.
Why do we care about GNU? Well, at the moment we’re particularly interested in two utilities it provides - GCC (GNU C Compiler) and ‘make’ (or more correctly gmake but personally I’ve never seen a make that wasn’t :P). I’m pretty sure you can guess GCC’s purpose, but from the sounds of it you aren’t so familiar with make.
Without going into details, make is used to simplify the repetitive compilation process during developmen by creating a configuration file (Makefile) which tells make two things -1) any input files that your output files depend on, and 2) how to create the output files from the input files (so, in this case the output file you are interested in is the GLFW library, and the input files are the source).
Now, along comes DOS/Windows - it’s a different system, and doesn’t support GCC or gmake. Hey what the hell, it doesn’t even include a compiler?! Oh, but you can buy one… (of course, nowadays you can download one for free )
I’m getting off track a bit, but to bring it back I get the impression that MSVC and the like /do/ include some kind of command-line make facility - not gmake (I’m getting to that), but something slightly different. I *think* this is what COMPILE.BAT is for - to provide a fairly simple interface for compiling glfw under windows with non-GNU tools.
We, on the other hand, are stuck with our free Dev-C++/MinGW and cygwin compliation environments. As it happens, MinGW and cygwin are both efforts to provide GNU tools under windows. Which means… to compile under windows we do exactly the same as if we were compiling under any other GNU environment! (well, except we use a different make file)
One final note, anyone who knows what is going on with the Dev-C++/MinGW relationship could probably tell you how to run make without downloading and setting up the command-line MinGW. Unfortunately I don’t have a fricken clue
Well, I hope that gives you some idea of what’s going on when it comes to compiling software. Good luck, and happy hacking!