简体   繁体   English

无法在Mac OSX小牛上编译wxwidgets项目

[英]cannot compile wxwidgets project on mac OSX mavericks

I'm working on porting across an application to the MAC OSX (Mavericks). 我正在努力将应用程序移植到MAC OSX(Mavericks)。 I have installed wxWidgets and the following two commands successfully return output from the terminal. 我已经安装了wxWidgets,下面的两个命令成功地从终端返回了输出。

wx-config --libs

Gives the following output. 提供以下输出。

-L/usr/local/lib   -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL /usr/local/lib/libwx_osx_cocoau-3.0.a -framework WebKit -lwxregexu-3.0 -lwxtiff-3.0 -lwxjpeg-3.0 -lwxpng-3.0 -lz -lpthread -liconv 

and

wx-config --cxxflags

Gives the following output. 提供以下输出。

-I/usr/local/lib/wx/include/osx_cocoa-unicode-static-3.0 -I/usr/local/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ 

However, I tried to compile a basic wxWigets project using code blocks and netbeans. 但是,我尝试使用代码块和netbeans编译基本的wxWigets项目。 I followed numerous tutorials, but every time I build my project I get the following compile error. 我遵循了许多教程,但是每次构建项目时,都会遇到以下编译错误。

"fatal error: 'wx/setup.h' file not found “严重错误:找不到“ wx / setup.h”文件

I have added the following settings to the code blocks (and tried netbeans) IDE: 我已经在代码块(并尝试使用netbeans)IDE中添加了以下设置:

  • Compiler Settings -> Other options == wx-config --cxxflags 编译器设置->其他选项== wx-config --cxxflags

  • Linker Settings -> Other linker settings == wx-config --libs 链接器设置->其他链接器设置== wx-config --libs

but I just can't get my widgets project to build :( 但是我只是无法让我的小部件项目建立:(

can anyone please help 谁能帮忙吗

Thanks in advance 提前致谢

I see only two possible explanations: 我只看到两种可能的解释:

  1. You didn't install wxWidgets using make install , ie there is no actual wx/setup.h under the directory output by your wx-config --cxxflags . 您没有使用make install安装wxWidgets,即在wx-config --cxxflags输出的目录下没有实际的wx/setup.h wx-config --cxxflags
  2. Your IDE doesn't run commands in its settings (BTW, I assume you did put wx-config --cxxflags inside the backticks). 您的IDE不会在其设置中运行命令(顺便说一句,我假设您确实将wx-config --cxxflags放在了反引号内)。 In this case you need to copy and paste the actual output instead of using wx-config directly. 在这种情况下,您需要复制并粘贴实际输出,而不是直接使用wx-config

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM