2012年11月26日 星期一

[Mac] build wxWidgets2.8.12 from source code in MacOSX


  • 執行以下程式
    • mkdir build
    • cd build
    • arch_flags="-arch -i386"
    • ../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-unicode --enable-debug --disable-shared --with-osx_cocoa --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
    • make
    • cd ..
    • cd build-carbon-debug/samples;make;cd ../..
    • cd build-carbon-debug/demos;make;cd ../..
  • 發生以下錯誤
    • ../include/wx/mac/carbon/private.h:1459: error: 'Cursor' does not name a type
  • 解決辦法
    • Apple Developer Center 下載 XCode 4.3.3
    • 右鍵選擇 Package Content
    • 將 /Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSC10.6.sdk 整個資料夾 copy到 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
    • build clean
    • build
  • 參考網站

沒有留言:

張貼留言