2016-06-17 2 views
0

내 C++ 프로젝트를 컴파일하려고 할 때 컴파일러가 ZMQ의 poller.ipp에 오류와 함께 종료됩니다. 뭔가 잘못하고 있는데 컴파일러 플래그가 필요합니까?컴파일 할 때 ZMQ의 poller.ipp에 오류가 발생했습니다.

내가 brew install czmqpp

시스템 사용하여 C++ 바인딩 (czmqp ++)를 설치 한

: 맥 OSX이 내가 다음 명령을 사용하여 컴파일하려고 출력입니다 10.11.5

:

> gcc -Wall -o HardwareHub HardwareHub.cpp 

In file included from HardwareHub.cpp:4: 
In file included from ./ZMQCommunicator.h:3: 
In file included from /usr/local/include/czmq++/czmqpp.hpp:28: 
In file included from /usr/local/include/czmq++/poller.hpp:48: 
/usr/local/include/czmq++/impl/poller.ipp:29:19: error: expected expression 
    auto unmask = [](socket& s) 
       ^
1 error generated. 

미리 감사드립니다.

답변

1

C 컴파일러가 아닌 C 컴파일러를 사용해야합니다.

> gcc -Wall -o HardwareHub HardwareHub.cpp 

현재 설치된 GCC 버전이 현재의 C++ 표준 사용을 지원하지 않는 경우

> g++ -Wall -o HardwareHub HardwareHub.cpp 

> g++ -std=c++11 -Wall -o HardwareHub HardwareHub.cpp 
+0

오 감사합니다, 나는 그것을 생각 해야한다 그런 쉬운 것일 것입니다. – andreaspfurtscheller

관련 문제