Building Universal Binary on Mac

  • hearsedriver

    hearsedriver - 2008-12-29

    Dear all,

    I'm trying to build wxPropertyGrid as a static universal binary lib for the Mac. I've already mailed Jaakko about this issue, but he doesn't know anything about building under OSX, so probably someone here has an idea.

    Here's what I got:

    I'm currently building with

    ./configure --disable-unicode --disable-shared  --with-wx-config=/usr/local/bin/wx-config

    I did not find any hints to build a UB with ./configure --help
    wxWidgets has --enable-universal_binary, and this seems to work partly, as I can see from the output:

    g++ -o samples/propgridsample propgridsample_minimal.o propgridsample_propgridsample.o propgridsample_sampleprops.o propgridsample_tests.o propgridsample_xh_propgrid.o  -L./lib  -L./lib     -lwxcode_mac_propgrid-2.8 -L/usr/local/lib  -arch ppc -arch i386  -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL  /usr/local/lib/libwx_mac-2.8.a -framework WebKit -lwxexpat-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lz -lpthread -liconv

    i386 and ppc are given as the target architecture. This brings the following warning, though:

    ld warning: in propgridsample_minimal.o, file is not of required architecture

    Eventually it fails with the following error message:

    Undefined symbols for architecture ppc:
    "_main", referenced from:
         start in crt1.10.5.o
    ld: symbol(s) not found for architecture ppc
    collect2: ld returned 1 exit status

    Any hints greatly appreciated!



Log in to post a comment.