正文

Compile Audacity 1.3.11 Beta -- 2

(2010-01-31 13:43:25) 下一個
Build wxWidgets on MAC OS X 10.6.2Building on Snow Leopard for Snow LeopardWhen trying to build wx under 10.6 you might - on certain machines - end up with errors like this:./src/common/intl.cpp: In static member function ‘static int wxLocale::GetSystemLanguage()’:../src/common/intl.cpp:2060: error: ‘smScriptLang’ was not declared in this scope../src/common/intl.cpp:2060: error: ‘GetScriptVariable’ was not declared in this scope../src/common/intl.cpp:2061: warning: ‘GetScriptManagerVariable’ is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h:993)../src/common/intl.cpp:2061: warning: ‘GetScriptManagerVariable’ is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h:993)make: *** [baselib_intl.o] Error 1The reason is that the default compiler on 10.6 is gcc 4.2, and if you are on a Core 2 Duo which is 64-bit capable, you end up compiling Carbon-only 2.8 for 64 bits which fails, due to the lack of 64-bit Carbon support. If you want 64-bit wxWidgets on OS X you'll need 2.9+ and configure -with-osx_cocoa - see below; but remember that 2.9 is not an official, stable release and wxOSX/Cocoa is not yet complete.So, to compile with 2.8 on a 64-bit Mac, you have to explicitly indicate the architectures you want:arch_flags="-arch i386"./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" ...This makes the library and samples build nicely for Intel 32-bit targets, and you can also add -arch ppc to the arch_flags so that you can build universal binaries.The following steps built wxWidgets 2.8.10 on Snow Leopard successfully:mkdir osx-buildcd osx-buildenv arch_flags="-arch i386"../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flagDs" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"makesudo make installLog shown as below if test ! -d /usr/local/include/wx-2.8/`dirname $f` ; then /usr/bin/install -c -d /usr/local/include/wx-2.8/`dirname $f`; fi; cp -fp ../include/$f /usr/local/include/wx-2.8/$f; done ------------------------------------------------------ The installation of wxWidgets is finished. On certain platforms (e.g. Linux) you'll now have to run ldconfig if you installed a shared library and also modify the LD_LIBRARY_PATH (or equivalent) environment variable. wxWidgets comes with no guarantees and doesn't claim to be suitable for any purpose. Read the wxWidgets Licence on licencing conditions.
[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.