简体   繁体   English

为OS X 10.10配置wxWidgets

[英]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.

相关问题 在Mac OSX 10.10上编译WxWidgets - Compiling WxWidgets on Mac OSX 10.10 如何在OS X 10.10应用程序中访问任意文件? - How to access arbitrary file in OS X 10.10 app? 我可以在OS X 10.10 Yosemite上安装XCode 7.3吗? - Can I install XCode 7.3 on OS X 10.10 Yosemite? Mac OS X 10.10上的ffmpeg 2.8.x交叉编译错误 - ffmpeg 2.8.x cross compile error on mac os x 10.10 运行在10.6到10.9的OS X应用程序不能在10.10(约塞米蒂)上运行 - 为什么? - OS X app that runs on 10.6 to 10.9 doesn't run on 10.10 (Yosemite) — why? 在OS X 10.10(Yosemite Beta)中,如何使用iOS 6.1模拟器进行测试? - In OS X 10.10 (Yosemite Beta), How do I Test Using iOS 6.1 Simulator? 如何在OS X 10.10的Xcode 6中提供库框架? - How can I make a library framework available in Xcode 6 on OS X 10.10? 我的Mac OS X App可以在10.10及更高版本中使用Storyboard,但不能在10.6至10.9中使用Storyboard吗? - Can my Mac OS X App use Storyboards in 10.10 and later, but not in 10.6 through 10.9? 在Mac OS X 10.10 Yosemite上出现错误消息“更改项目的最低部署目标或升级My Mac的OS X版本。”? - Error message on mac os x 10.10 Yosemite “Change your project’s minimum deployment target or upgrade My Mac’s version of OS X.”? 带有新OS 10.10 Yosemite的Xcode 5.1在屏幕上显示青色圆圈 - Xcode 5.1 with new OS 10.10 Yosemite displays Cyan circle on screen
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM