wxWidgets 自动会议设置未将包含目录设置为 -Isystem,而是设置为 -I
wxWidgets autoconf setup doesn't set include dirs as -Isystem but as -I
我继承了一个使用 autoconf 和 automake 来构建的构建系统。除了在高层次上之外,我完全不熟悉它是如何工作的。
构建系统本身工作正常。但是,系统标头会生成许多警告。就我而言,wxWidgets。造成这种情况的原因是wxWidgets的包含目录被传递为-I而不是-isystem
。我已经在网上搜索过,但我找不到如何改变这一点。
以下代码位于configure.ac
文件中:
AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG(3.0.2, wxWin=1, , ,[--debug=yes])
if test "$wxWin" != 1; then
AC_MSG_ERROR([
wxWidgets must be installed on your system
but no wx-config script could be found.
Please check that wx-config is in path, the directory
where wxWidgets libraries are installed as returned by
'wx-config --libs' is in the linker path (LD_LIBRARY_PATH
or equivalent variable) and wxWidgets version is 2.9.4 or
above.
])
fi
if test "$wxWin" != 0; then
AC_DEFINE(HAVE_WXWIDGETS,1,[define if the wxWidgets 3.0.2. or higher is available])
fi
然后有一个Makefile.am
执行以下操作:
bin_PROGRAMS = project
project_SOURCES = {sources here}
project_CPPFLAGS = $(AM_CPPFLAGS) $(PROJECT_CPPFLAGS) $(WX_CPPFLAGS)
project_CFLAGS = $(AM_CFLAGS) $(PROJECT_CFLAGS) $(WX_CFLAGS)
project_CXXFLAGS = $(AM_CXXFLAGS) $(PROJECT_CXXFLAGS) $(WX_CXXFLAGS)
project_LDFLAGS = $(AM_LDFLAGS)
project_LDADD = $(AM_LIBADD) $(WX_LIBS)
似乎没有一个选项可以以某种方式将其指定为系统标头。
你们中有谁知道我该如何解决这个问题吗?
该问题与自动确认无关。罪魁祸首是wx-config
工具。该工具用于获取包含目录。例如,调用wx-config --cxxflag
将导致:
-I/usr/lib/wx/include/gtk2-unicode-3.1 -I/usr/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread
它被传递给编译器。有几种方法可以解决这个问题。要么在输出中手动替换它,要么修补 wx-config。
相关文章:
- 为不同配置设置MSVC_RUNTIME_LIBRARY的正确方法是什么
- 在C++/Linux中设置单调时钟的一些技巧
- 如何在选项卡视图Qt中设置一个新项目,并保存以前的项目
- 嵌套在类中时无法设置成员数据
- 需要帮助设置在C++中使用的Potrace
- 如何在自删除后将对象设置为nullptr
- 将指针设置为"nullptr"并不能防止双重删除?
- 如何在Ubuntu中使用cmake设置qt4
- ld:bind_at_load和-bitcode_bundle(Xcode设置ENABLE_bitcode=YES)不能
- 如何在boost beast http请求中设置http头
- 如何解决gcc编译器优化导致的centos双编译器设置中的分段错误
- 如何将这个C++哈希表转换为动态扩展和收缩,而不是使用硬设置的最大值
- 为什么文件名被设置为一个点,而不是在读取矢量中的文件名时
- 如何在24位SDL_Surface上设置像素的颜色
- std::设置自定义比较器
- 如何设置一个范围来提取我想要获得的信息
- 如何在C/C++中用FD_set Unix设置套接字文件描述符
- 通过选项卡的文本设置QTabWidget顺序
- 将特征矩阵的向量设置为0
- wxWidgets 自动会议设置未将包含目录设置为 -Isystem,而是设置为 -I