[ptx] wxwin and gcc 4.0

JD Smith jdsmith at as.arizona.edu
Thu Apr 20 23:30:04 BST 2006


On Thu, 2006-04-20 at 10:11 +0200, Pablo d'Angelo wrote:
> Daniel M. German schrieb:
> > Well, wxwin does not seem to compile with gcc version 4.0:
> > 
> > [dmg at hydrogen:~/hacking/wxMac-2.6.3/osx-build] make
> > ./bk-deps g++-4 -c -o basedll_appbase.o  -D__WXMAC__            -DwxUSE_GUI=0 -DWXMAKINGDLL_BASE -DwxUSE_BASE=1 -dynamic -fPIC -DPIC -DNO_GCC_PRAGMA -Ilib/wx/include/mac-ansi-release-2.6 -I../include -I/sw/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fpascal-strings -I../src/mac/carbon/morefilex -I/Developer/Headers/FlatCarbon -O2 -fno-strict-aliasing -I/sw/include -Wall -Wundef -Wno-ctor-dtor-privacy -fno-common ../src/common/appbase.cpp
> > g++-4: unrecognized option '-no-cpp-precomp'
> > cc1plus: error: unrecognized command line option "-fpascal-strings"
> > make: *** [basedll_appbase.o] Error 1
> > 
> > 
> > And if I compile hugin with version 4.0 and wxwin with 3.3 then I get
> > manging problems that result in undefined symbols (wxmac related, and
> > these occur with another wxman application that I am using a test).
> > 
> > I'm going to try to install gcc-3.4 and hope for the best.
> 
> Hmm, building on OSX seems to be more troublesome than I thought.
> 
> I had hoped that it would be possible to use the supplied compiler (by
> apple) to build the stuff.
> 
> However, I don't know the details, for example if libraries installed with
> fink are compatible with the apple gcc and can be used to create universal
> binaries.
> 
> What were the problems with the apple supplied compiler? was ist just the
> boost ublas stuff, or are other packages also affected?
> 
> The latest CVS does not require boost ublas anymore.

The gcc supplied by Apple (as of OSX 10.4) is gcc 4.0.0.  Since
wxWidgets is in DarwinPorts (highly recommended), and I recently build
it, I know it compiles fine.  It was as simple as:

% sudo port install wxWidgets

Boost is also included in Darwinports, and installs and builds just fine
as well:

http://www.darwinports.org/darwinports/dports/devel/boost/Portfile

In fact the only thing I couldn't get in there is libpano12.  I'm
assuming you still bundle all your vigra parts with hugin, yes... or was
this changed because of license incompatibility issues?  Assuming these
libraries all use pkg-config, building just the binary (not the .app
bundle) on OSX should in principle be very straightforward.

In terms of building universal binaries, I did find this note on passing
certain CFLAGS/LDFLAGS to get a universal:

http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/compiling/chapter_4_section_3.html

Not sure if that would work with DarwinPorts.

JD




More information about the ptx mailing list