Compiling WxWidgets on Mac OSX 10.10

£可爱£侵袭症+ 提交于 2019-12-13 03:46:52

问题


I'm trying to compile WxWidgets 3.0.2 on my mac OSX 10.10 and I get the following message:

Blockquote ... ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/Users/.../wxWidgets-3.0.2/build_rel/lib/libwx_osx_cocoau-3.0.0.2.0.dylib] Error 1

I'm compiling using these flags

../configure --with-osx_cocoa --with-macosx-version-min=10.7 --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk --prefix="$(pwd)" --with-opengl CC=clang CXX=clang++ CXXFLAGS="-stdlib=libc++ -std=c++11" OBJCXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS=-stdlib=libc++ --enable-universal-binary=x86_64 --enable-monolithic --enable-unicode --with-expat=builtin --with-zlib=builtin --with-libtiff=builtin --with-regex=builtin --with-libpng=builtin --with-libjpeg=builtin

As you can see I added the enable-universal-binary=x86_64 as suggested in other topics.

If you can suggest other flags that I might have not added or I should remove that would be great.. Thanks


回答1:


The other way:

brew install wxwidgets

you will get compiled wxWidgets in /usr/local/Cellar.




回答2:


In principle, this should work, but what is the point of using --enable-universal-binary=x86_64? It's not universal if there is only a single architecture... You probably wanted to use --enable-macosx_arch=x86_64 instead.

BTW, I think the various stdlib-related options are unnecessary as well, clang is the default compiler under 10.10. And --enable-unicode is definitely superfluous.




回答3:


If you need wx3.0.0 osx 10.7+ monolitic, shared library can get it from here wxphp stub bundle

Library is included in app/contents/resources , use it if you want. but you need headers c++, get it from wx side.




回答4:


As posted here, you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/ as a workaround. There is an fixed issue about it and will probably be released on 3.0.3.



来源:https://stackoverflow.com/questions/27831360/compiling-wxwidgets-on-mac-osx-10-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!