在Ubuntu上编译Basler Pylon SDK
Compiling Basler Pylon SDK for OpenFrameworks on Ubuntu
我正在尝试使用basler(https://www.baslerweb.com/)摄像头,并在OpenFrameworks上使用一些OpenCV东西。我以前曾使用Point Gray相机(带有" FlyCapture2" SDK),没有太多麻烦。Basler有一些称为Windows,Linux和Mac OS的塔SDK。
我可以毫无问题地编译塔架自己的示例,但是当我#include <pylon/PylonIncludes.h>
时,我立即发现编译器问题。我已经适当地修改了我的项目的config.make文件(我认为),因此编译器肯定会找到标题文件,但是我不断遇到与塔库中更深层次的错误有关的错误:
In file included from /usr/include/X11/Xlib.h:44:0,
from /usr/include/GL/glx.h:30,
from /home/stephen/of_v0.9.8_linux64_release/libs/openFrameworks/utils/ofConstants.h:184,
from /home/stephen/of_v0.9.8_linux64_release/libs/openFrameworks/ofMain.h:5,
from /home/stephen/of_v0.9.8_linux64_release/apps/myApps/canPointerOsc/src/main.cpp:1:
/opt/pylon5/include/GenApi/Types.h:130:9: error: expected identifier before numeric constant
None, //!< name resides in custom namespace
看来"无"在其他地方被定义(成数字常数?)。奇怪的是,在编译自己的样品时,这永远不会发生。关于OpenFrameWorks编译过程(选项传递给G ?)是否有一些可能破坏其自己代码的部分:
//! Defines from which standard namespace a node name comes from
//! ingroup GenApi_PublicUtilities
typedef enum _EStandardNameSpace
{
None, //!< name resides in custom namespace
GEV, //!< name resides in GigE Vision namespace
IIDC, //!< name resides in 1394 IIDC namespace
CL, //!< name resides in camera link namespace
USB, //!< name resides in USB namespace
_UndefinedStandardNameSpace //!< Object is not yet initialized
} EStandardNameSpace;
有什么想法?
看来通过预处理器有矛盾的定义,可能埋在OpenFrameworks本身或其中包括的依赖项之一中。在包含塔标头文件之前添加以下几行解决了问题:
#undef None
#undef Status
哥德,预处理程序!
相关文章:
- 使用外部SDK工具链文件在VisualStudio上生成项目编译错误
- Vulkan SDK 版本 1.1.85.0 在 Kubuntu 18.10 上链接
- 升级到 Windows 10 版本 1809 SDK 后,我无法编译使用 C++/WinRT 的项目
- 在设计 SDK 时,我是否应该在 C++ 头文件中完全隐藏内部类?
- Eventloop 卡住:NAO C++ SDK OnFaceDetection 示例
- 构建失败错误:无法使用 qibuild 构建C++ SDK Helloworld
- Microsoft C++ 用于图形 API 的 Rest SDK
- 如何检索 Steamwork SDK 的当前版本
- 佳能SDK无法从相机下载图片
- 如何使用 CPP REST SDK 实现 CAS(中央认证服务)?
- 在为 iOS 构建 aws-sdk-cpp 时,cmake 上的 CXX 编译器错误已损坏
- 关于 API 文档和设备操作 在助手-sdk-cpp 上
- C++标准视窗 SDK 文件中的编译错误
- DLL:当 SDK 头文件不使用 __declspec(dllexport) 时,我可以使用它吗
- 将 aws-iot-device-sdk-cpp-v2 与 CMake 结合使用
- "byte":使用Crypto++和Windows SDK时出现不明确的符号错误
- FBX SDK 在预期 3 个顶点时返回 4 个顶点
- 在Ubuntu上编译Basler Pylon SDK
- Basler Pylon 4 SDK和OPENCV 2.4.8, Linux简易查看器
- Basler Pylon 4 SDK and OPENCV 2.4.9, CPylonImage to Mat