【问题标题】:Can't build test application with WxWIdgets in Netbeans无法在 Netbeans 中使用 WxWIdgets 构建测试应用程序
【发布时间】:2013-05-16 14:40:38
【问题描述】:

我是一个完全的 c++ 新手。

我正在尝试在 Net Beans 下使用 Wx-Widgets 构建 Windows 应用程序。

到目前为止一切顺利。我已经安装了所有东西,配置,构建 wx-widgets 并将其附加到新项目中 - 在这里有一个好人的帮助:Can't make wx-widget work with net-beans

现在我尝试构建我的第一个应用程序:

#include <wx/string.h>

int main(int argc, char **argv)
{
  wxPuts(wxT("A wxWidgets console application"));
}

这就是我得到的:

我不确定这是否可读,所以我粘贴了错误:

g++ `C:\WXWIN\wx-config --cxxflags`    -c -g -I../../../WXWIN/include `C:\WXWIN\wx-config --cxxflags` -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
/bin/sh.exe: C:WXWINwx-config: command not found
/bin/sh.exe: C:WXWINwx-config: command not found
In file included from ../../../WXWIN/include/wx/defs.h:21:0,
                 from ../../../WXWIN/include/wx/string.h:25,
                 from main.cpp:1:
../../../WXWIN/include/wx/platform.h:196:22: fatal error: wx/setup.h: No such file or directory
compilation terminated.
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `/c/xampp/htdocs/WxWwigets_tutorial'
make[1]: Leaving directory `/c/xampp/htdocs/WxWwigets_tutorial'


BUILD FAILED (exit value 2, total time: 859ms)

请注意,我已经在链接器和编译器中设置了所有内容,如下所示:http://wiki.wxwidgets.org/Compiling_using_Netbeans

【问题讨论】:

    标签: c++ netbeans compiler-errors wxwidgets


    【解决方案1】:

    错误就在您面前:“找不到命令”。如果你使用/bin/sh,你必须使用 Unix 风格的路径,例如C:/WXWIN/wx-config 而不是带有反斜杠的 DOS 路径。

    我强烈建议您熟悉您正在使用的环境,而不是在不理解它们的情况下仅遵循 Wiki 说明,否则您的问题不会很快结束。

    【讨论】:

    • 是的,我有它在我面前,只是不知道如何处理它:) 从命令行尝试 C:\WXWIN\ 而不是 C:/WXWIN/ - 谢谢帮助. +1。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-06
    • 2012-02-05
    • 2011-11-25
    • 1970-01-01
    • 1970-01-01
    • 2014-03-13
    相关资源
    最近更新 更多