Building On Mac

Jorge Peña jorgepblank at gmail.com
Fri Mar 30 00:16:03 EDT 2007


Hey guys, I already asked on IRC so, sorry for bothering. But I was able to
SSH into my friend's mac for the first time in a long time (Probably like, 3
months) and a lot in my game has changed since then. I enabled freetype
support with BUILD_FREETYPE, and I also enabled OGG Vorbis support as well
as curl support. All of this works perfectly on Linux and Windows, however,
when I tried it on Mac OS X, it didn't work. Note that before, the game
built perfectly.

I realized I needed the libraries, so I got them and compiled and installed
but it still didn't find the libraries, so I checked in the /lib and
/include directories but there was nothing there. So I basically did a
./configure --prefix=/tmp/whateverlibitwas and then did the rest as normal,
and at the very end moved the things within /tmp/whateverlibitwas/lib to
ioquake3's libs/macosx folder, since I had already seen libSDL in there I
figured it'd pick those up too. Well, I started getting 'No such file or
directory' errors in files where I'd do #include <blah/blah.h>, and so I had
to change them to be relevant inclusions instead of as they were (What I
mean is, for example, I'd change it to #include "../blah/blah.h"), although
inconvenient, I was desperate to build, so I tried. I noticed the libraries
weren't being picked up after all, so after some ignorant skimming through
the Makefile (Ignorant cause I'm not Makefile writer, I mean, I can hack
things up so they work usually but I can't write them out of thin air), and
I noticed that libSDL was being linked to explicitly, so I looked for a
section in the Makefile that had to do with Mac, and to the LDFLAGS section
I noticed an -L line, I man gcc'd this and then /-L'd, and I found out that
this had to do with the inclusion of the directories it should look in for
libraries. Logically, I added -Lcode/libs/macosx, but this didn't work
either.

I'm sorry for going through this a roundabout way instead of just getting to
the point but I want to make sure I'm understood (Not because I think you
guys are stupid, but because, since I'm no expert at this, I'm afraid I
might be wording my question wrong). I now have every dylib and a file
(Dynamic and static?) libraries in libs/macosx, but I'm still having
problems with the header inclusions and library linking. At first I noticed
it was asking for -lvorbisfile, for example, and the library was actually
called libvorbisfile.a, so I renamed it to vorbisfile (Same with the rest),
to no avail.

Seeing as I personally don't have a mac or have ever used one for that
matter (Other than through SSH, which I only know thanks to Linux), I'm
rather confused as to the whole development structure of it. Where are
headers and libraries held, is there a central place? What do you guys
suggest I do? Tweaking everything over again just for it to work on Mac
seems inconvenient, I'm sure I'm doing something wrong.

Thanks guys, sorry for the long message, but I'd really appreciate it. And
yes, I AM using the mac build script (Always have been). Thanks again, I
really appreciate it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/quake3/attachments/20070329/4bd444aa/attachment.htm>


More information about the quake3 mailing list