[英]Configuring wxWidgets for OS X 10.10
I am trying to build a program that relies on wxWidgets to run properly. 我正在尝试构建一个依靠wxWidgets正常运行的程序。 I have the latest version of Xcode installed. 我已经安装了最新版本的Xcode。 I have tried building wxWidgets (both wxWidgets-3.0.2 and wxWidgets-2.9.4, the version originally used by the main program). 我尝试构建wxWidgets(wxWidgets-3.0.2和wxWidgets-2.9.4,这是主程序最初使用的版本)。 However, in both cases, running the makefile for the main program gives the following error: 但是,在两种情况下,运行主程序的makefile都会出现以下错误:
make: /Users/ path to wxWidgets /wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc: No such file or directory make:/ Users / wxWidgets的路径 /wxWidgets-2.9.4/build-cocoa-release/utils/wxrc/wxrc:没有这样的文件或目录
As I understand it, I need to build wxrc to get my main program to build properly (I have tried this, but apparently some header files are missing). 据我了解,我需要构建wxrc才能使我的主程序正确构建(我已经尝试过了,但是显然缺少一些头文件)。 Is there any way to configure wxWidgets before this step that will automatically build wxrc as well? 在此步骤之前,有什么方法可以配置wxWidgets来自动构建wxrc吗? Or is that something I need to build separately? 还是我需要单独构建一些东西? If it is separate, how would that be done? 如果是分开的,那该怎么办?
I've pasted the code I originally used to configure wxWidgets below, with line breaks to make it easier to read: 我在下面粘贴了最初用于配置wxWidgets的代码,并使用换行符使其更易于阅读:
../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++
There is one error while building wxWidgets: ../src/osx/cocoa/utils.mm:250:28: error: cannot initialize a parameter of type 'id' with an lvalue of type 'wxNSAppController *' [NSApp setDelegate:appcontroller]; 构建wxWidgets时发生一个错误:../src/osx/cocoa/utils.mm:250:28:错误:无法初始化类型为“ id”且参数类型为“ wxNSAppController *”的左值的参数[NSApp setDelegate:appcontroller ]。
When I go into the samples directory and enter "make", I get: ld: library not found for -lwx_osx_cocoau_xrc-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) When entering "make" in demos, I get: ld: library not found for -lwx_osx_cocoau_core-2.9 clang: error: linker command failed with exit code 1 (use -v to see invocation) 当我进入示例目录并输入“ make”时,我得到:ld:-lwx_osx_cocoau_xrc-2.9 clang找不到库:错误:链接器命令失败,退出代码为1(使用-v查看调用)输入“ make”时在演示中,我得到:ld:-lwx_osx_cocoau_core-2.9 clang找不到库:错误:链接器命令失败,退出代码为1(使用-v查看调用)
If I missed any steps I should have taken before these (something with Xcode maybe?) please let me know. 如果我错过了在此之前应该采取的任何步骤(可能是Xcode的东西?),请告诉我。 Thank you very much in advance. 提前非常感谢您。
Similar question . 类似的问题 。 I have sugested a workaround proposed on a forum as follows: you can use --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/
". 我已经sugested提出了一个论坛,一个解决方法如下:您可以使用--with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/
”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.