【发布时间】:2016-11-25 05:03:07
【问题描述】:
我的wxwidget(3.10 dev version)是根据这个链接安装的:
http://codelite.org/LiteEditor/WxWidgets31Binaries
发现里面有对应的头文件:
/usr/include/wx-3.1-unofficial/wx/wx.h
在听到的文件中,“wx.h”是这样包含的:
#ifndef DSTODO_H_
#define DSTODO_H_
#include <wx/wx.h>
构建时,eclipse给了我:
Info: Internal Builder is used for build
clang++ -I/usr/lib/llvm-3.8/lib -O0 -emit-llvm -g3 -Wall -c -fmessage-length=0 -o src/DSToDo.bc ../src/DSToDo.cpp
In file included from ../src/DSToDo.cpp:8:
../src/DSToDo.h:11:10: fatal error: 'wx/wx.h' file not found
#include <wx/wx.h>
^
1 error generated.
更改后包括:
#include <wx-3.1-unofficial/wx/wx.h>
Eclipse 给了我:
Info: Internal Builder is used for build
clang++ -I/usr/lib/llvm-3.8/lib -O0 -emit-llvm -g3 -Wall -c -fmessage-length=0 -o src/DSToDo.bc ../src/DSToDo.cpp
In file included from ../src/DSToDo.cpp:8:
In file included from ../src/DSToDo.h:11:
/usr/include/wx-3.1-unofficial/wx/wx.h:14:10: fatal error: 'wx/defs.h' file not found
#include "wx/defs.h"
^
1 error generated.
如果添加
/usr/include/wx-3.1-unofficial
到
c/c++ build->settings->LLVM Clang++->Includes
Eclipse 给出:
Info: Internal Builder is used for build
clang++ -I/usr/lib/llvm-3.8/lib **-I/usr/include/wx-3.1-unofficial** -O0 -emit-llvm -g3 -Wall -c -fmessage-length=0 -o src/DSToDo.bc ../src/DSToDo.cpp
In file included from ../src/DSToDo.cpp:8:
In file included from ../src/DSToDo.h:11:
In file included from /usr/include/wx-3.1-unofficial/wx/wx.h:14:
In file included from /usr/include/wx-3.1-unofficial/wx/defs.h:20:
/usr/include/wx-3.1-unofficial/wx/platform.h:136:10: fatal error: 'wx/setup.h' file not found
#include "wx/setup.h"
^
1 error generated.
如何解决这个问题?
【问题讨论】:
-
“标题搜索路径”和“链接器选项”的项目设置是什么?