Compiling listner code

Sep 10, 2015 at 1:16 PM
Hi,
i have written a small server using http_listener. i am able to run the code from xcode. But when i try to compile the code from command line i get lots of errors. the first one being

Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:539:2: error: <atomic> is not implemented

error <atomic> is not implemented

i have added the header file path to CPATH env variable.following is output of "cpp - v" command--
/usr/local/Cellar/boost/1.56.0/include
/usr/local/Cellar/ffmpeg/2.3/include
/Users/apple/Vorator/casablanca/Release/include
.
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)

for compiling i am simply using ---
g++ -c Api.c

How to fix this.
Sep 10, 2015 at 2:24 PM
i figured it out.
i had to use c++ 11 inorder to compile the code.
g++ -std=c++11 Api.c
Marked as answer by gaurav_123qwe on 9/10/2015 at 6:24 AM