building wx2.6.3 on mac
Armel Asselin
armelasselin at hotmail.com
Sun Nov 12 06:14:16 PST 2006
"Kevin Ollivier" <kevino at theolliviers.com> a écrit dans le message de news:
C0EE01F7-4142-410C-9B24-8A14F215D8A2 at theolliviers.com...
> Hi Armel,
>
> On Nov 11, 2006, at 1:00 PM, Armel Asselin wrote:
>
>>
>> Hello,
>>
>> i'd like to build wxWidgets (wxMac 2.6.3) for Universil Binaries [nb:
>> i'd
>> like to avoid having to use anything else because this version is quite
>> heavily patched]
>> My Mac is x86 (10.4.5), XCode 2.2.1, g++ 4.0.1 (default g++)
>>
>> I tried to configure with this:
>> configure --with-mac --enable-universal_binary --enable-unicode --
>> with-libpng=builtin
>> --with-zlib=builtin --with-libjpeg=builtin --with-regex=builtin --
>> with-expat=builtin
>> --disable-shared --enable-debug --enable-debug_gdb
>>
>> it works well, and I can even build the samples... but when it comes to
>> my
>> own application ./configure, it fails with these errors:
>> Undefined symbols:
>> _main
>>
>> somewhere inside the original configure.ac lines:
>> # The final lines of the configure script
>> AC_PROG_CXX
>> AC_BAKEFILE([m4_include(autoconf_inc.m4)])
>> AC_CONFIG_FILES([Makefile])
>> AC_OUTPUT
>>
>> when trying to determine the default output file name of the compiler
>> (on
>> conftest.cc generated file, which contains only int main( ) { return
>> 0; })
>>
>> configure:1893:
>> g++ -D__VOSUNICODE -D_UNICODE -D_DEBUG -g -L/Users/armel/ubuild/dbg/
>> wx/lib -isysroot
>> /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -framework
>> QuickTime -framework IOKit -framework Carbon -framework Cocoa - framework
>> System /Users/armel/ubuild/dbg/wx/lib/libwx_macud_stc-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_macud_xrc-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_macud_qa-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_macud_html-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_macud_adv-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_macud_core-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_base_carbonud_xml-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_base_carbonud_net-2.6.a
>> /Users/armel/ubuild/dbg/wx/lib/libwx_base_carbonud-2.6.a -framework
>> WebKit -lwxregexud-2.6 -lwxexpatd-2.6 -lwxtiffd-2.6 -lwxjpegd-2.6 -
>> lwxpngd-2.6
>> -lwxzlibd-2.6 -lpthread -liconv conftest.cc >&5
>
> This looks like you're adding the output of wx-config to your compiler
> and linker flags before running the compiler tests. If that's the case,
> you don't want to do this if you're creating a Universal Binary. The
> compiler tests do not seem to like the -arch ppc and -arch i386 flags,
> and thus fail even if in actuality there is no problem. The solution is
> to run the tests and only add the wx- config compiler and linker flags
> after the tests complete successfully.
>
> Hope this helps,
you're right, I moved the AC_PROG_CXX above wxWidgets detection stuff, it
works now.
thank you
Armel
More information about the wx-users
mailing list