AC_CHECK_HEADER失败如果标题安装路径中有API
AC_CHECK_HEADER fail if the header install path has api in it
例如,bamtools package的标题文件之一是
安装/usr/local/include/bamtools/api
我试图将Include Flag设置为:
CXXFLAGS="$CXXFLAGS -I/usr/local/include/bamtools"
or
CXXFLAGS="$CXXFLAGS -I/usr/local/include/bamtools/api"
AC_CHECK_HEADERS([BamReader.h], [bamtools_found=yes], [AC_MSG_ERROR([Unable to find bambools header])])
如果我检查了config.log文件,第一个给了我一个错误:
configure:3837: g++ -c -g -O2 -I/usr/local/include/bamtools conftest.cpp >&5
conftest.cpp:54:23: fatal error: BamReader.h: No such file or directory
compilation terminated.
第二个给我以下错误:
configure:3837: g++ -c -g -O2 -I/usr/local/include/bamtools/api conftest.cpp >&5
In file included from conftest.cpp:54:0:
/usr/local/include/bamtools/api/BamReader.h:13:28: fatal error: api/api_global.h: No such file or directory
#include "api/api_global.h"^M
^
compilation terminated.
configure:3837: $? = 1
问题是bamreader.h尝试包括api/api_global.h
我通过将API放入AC_CHECK_HEADERS中得到了一个简单的修复。
CXXFLAGS="$CXXFLAGS -I/usr/local/include/bamtools"
AC_CHECK_HEADERS([api/BamReader.h], [bamtools_found=yes], [AC_MSG_ERROR([Unable to find bambools header])])
configure output
checking api/BamReader.h usability... yes
本质上,您必须通过将API/附加到每个标头来使用库。请评论:这是一个好习惯吗?
相关文章:
- 用于访问容器<T>数据成员的正确 API
- 如何使用Luacneneneba API正确读取字符串和表参数
- C++MySQL C api用户输入行
- 如何将更多文件夹添加到c++include路径
- 带有特殊路径部分的"std::filesystem::weakly_canonical"失败
- C++A*算法并不总是在路径中具有目标节点
- 如何使用 AWS Transcribe C++ API 中的'StartTranscriptionJobRequest'?
- 将std::string传递给WriteConsole API
- EvtExportLogneneneba API正在将远程计算机的事件日志保存到远程PC本身.如何将其保存到主机
- 从函数角度看ID到文件路径的内部与外部映射
- 在gtest.中使用fff.h模拟系统API
- 有没有任务栏API可以立即应用注册表更改
- C++win32 API创建多个类似视口的窗口
- boost xml parsingl将xml的路径作为变量发送
- AC_CHECK_HEADER失败如果标题安装路径中有API
- 提升 API 以检查目录路径是否在 c++ 中的网络上
- 如何找到已经通过dlopen API加载的dylib的路径
- POSIX 或 Linux API 函数,用于从路径获取文件扩展名
- 如何将文件的路径(或任何文本)显示/附加到编辑框中?(C++ Win32 API)
- 我想得到一个树结构的完整路径为任何子选择树.有没有可以直接使用的API ?