
Signature
Michal Adamczak
pokryfka@druid.if.uj.edu.pl
> >> g++ main.cc -o grav space.o gravspace.o spacedraw.o draw.o
> >> -L/usr/X11R6/lib/ -L/sw/lib/ -lGL -lGLU -lm -lSDL -lpthread -lobjc
[quoted text clipped - 17 lines]
> _main
> make: *** [grav] Error 1
I'd guess that main is having its name mangled as a C++ function. Try
changing this:
int main(...)
to this:
extern "C" int main(...)
Hope this helps,
Eric

Signature
Eric Albert ejalbert@cs.stanford.edu
http://outofcheese.org/
Gabriele Greco - 27 Sep 2004 11:48 GMT
hanks, i guess it helped but still there's something wrong :(
>>is there anything else should take care of?
>>
[quoted text clipped - 4 lines]
>>_main
>>make: *** [grav] Error 1
Add to the link line:
-lSDLmain
And be sure to include "SDL.h" in main.cc.
Anyway IMHO you should use the SDL framework available from libSDL.org,
you can use it also from the command line adding to your link line:
-F~/Library/Frameworks/ -framework SDL
The problem with fink SDL is that it may require X11 and it needs the
libraries placed in the same place they are in your system, the problem
with selfbuilt SDL is that it doesn't work with OSX version below the
one of your system and you will need to place the libraries with an
installer in the same location where they are located in your system.
Bye,
Gabry
Michal Adamczak - 28 Sep 2004 17:53 GMT
> Add to the link line:
> -lSDLmain
>
> And be sure to include "SDL.h" in main.cc.
unfortunatelly this didnt help
i shall look up the code and fix it a bit so it compiles with aqua
however i'd like to be able to compile it on linux as well
and i'm worried that i'll have to use preprocesor in order to do that
and write some code separately for each of them

Signature
Michal Adamczak
pokryfka@druid.if.uj.edu.pl
Gabriele Greco - 28 Sep 2004 18:04 GMT
> i shall look up the code and fix it a bit so it compiles with aqua
> however i'd like to be able to compile it on linux as well
> and i'm worried that i'll have to use preprocesor in order to do that
> and write some code separately for each of them
You don't need to do that.
Just compile yourself SDL or link against the SDL framework you find on
libsdl.org, I'm quite sure the problem is in your makefile or in your
SDL version.
I've ported a commercial game to Mac and Linux from w32 and the only...
#ifdef __APPLE__
...i've to add to the sources is to force CTRL+left button to do the
same of right button (I've to do it since the game need a two button
mouse :) )
Other than that I've two different makefiles, the osx one build the .app
structure and links with the correct libraries, no differences in
sources (370.000 lines).
Bye,
Gabry
PS: The demo version will be out the next week
Michal Adamczak - 27 Sep 2004 11:56 GMT
>> g++ main.cc -o grav space.o gravspace.o spacedraw.o draw.o
>> -L/usr/X11R6/lib/ -L/sw/lib/ -lGL -lGLU -lm -lSDL -lpthread -lobjc -lX11
[quoted text clipped - 8 lines]
> to this:
> extern "C" int main(...)
nope :(
the error message is still the same

Signature
Michal Adamczak
pokryfka@druid.if.uj.edu.pl