2017-10-03 10 views
0

openframeworks에 일부 openCV 항목이있는 Basler (https://www.baslerweb.com/) 카메라를 사용하려고합니다. 이전에 Point Grey 카메라 ("FlyCapture2"SDK 사용)를 너무 많이 사용하지 않았습니다. Basler는 Windows, Linux 및 Mac OS에서 작동하는 Pylon SDK라는 것을 가지고 있습니다.Ubuntu에서 OpenFrameworks 용 Basler Pylon 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 

"None"이 다른 곳의 숫자 상수로 정의되고있는 것 같습니다. 흥미롭게도 이것은 자신의 샘플을 컴파일 할 때 결코 발생하지 않습니다.

//! 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; 

어떤 생각 (? ++ G에 전달 옵션) 자신의 코드의이 부분을 깰 수있는 프로세스를 컴파일 오픈 프레임 웍스에 대해 뭔가가 있나요?

답변

0

전처리기를 통해 상충되는 정의가있는 것처럼 보이며 openFrameworks 자체 또는 포함 된 종속성 중 하나에 묻힐 수 있습니다. 문제는 철 탑 헤더 파일을 포함하기 전에 다음 줄 해결 추가 :

#undef None 
#undef Status 

같으니 라구 당신, 처리기를!