I am trying to use a Basler (https://www.baslerweb.com/) camera with some openCV stuff on openframeworks. I have previously used Point Grey cameras (with their “FlyCapture2” SDK) without too much trouble. Basler has something called Pylon SDK which works for Windows, Linux and Mac OS.
I can compile Pylon’s own examples without any issue, but when I #include <pylon/PylonIncludes.h>
then I immediately get compiler issues. I have modified the config.make
file for my project appropriately (I think), so the compiler definitely finds the header files, but I keep getting errors relating to something much deeper in the Pylon library, specifically:
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
It seems that “None” is getting defined (into a numeric constant?) somewhere else. Curiously, this never happens when compiling their own samples. Is there something about the openFrameworks compiling process (options passed to G++?) that might break this part of their own code:
//! 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;
Any thoughts?