GCC 3.x Compilation (was Re: [mapserver-users] Compile problems)
Sean Gillies
snchrstnglls at yahoo.com
Wed Oct 2 09:58:33 PDT 2002
Tom,
I'm new to gcc 3.x and only am introduced to it
because the Mac OS X C/C++ compiler is based on gcc
3.1. If you can use gcc 2.9.x I would recommend it
because compilation of mapserver and the requisite
libs is difficult with gcc 3.x. The developers are
not using gcc 3.x (as far as I can tell), so it's
easier if you stay with them.
I had a helluva time with GDAL until I realized that
I had to explicitly link with g++, and I suspect that
if any of your object files or libs have C++ code
you'll have to link using g++.
I suggest that you make a backup copy of your
Mapserver
Makefile. Open the Makefile and go to the lines where
the Mapserver apps are compiled. There will be lines
like these:
$(CC) -o shp2img shp2img.o ...
Replace $(CC) with $(CXX), and make sure that CXX is
defined as c++ or g++ at some lesser line number in
the Makefile (this should be true by default).
Cheers!
Sean
--- Tom Myny <tom at internetgids.be> wrote:
> I'm using indeed gcc 3.2.
> Do you know how I can link shp2img using g++ ? (i'm
> not really a c++ man :)
>
> Greetings,
> Tom
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
More information about the MapServer-users
mailing list