acfr / comma

generic c++ libraries
Other
27 stars 16 forks source link

Error when building on Mac OS X #62

Open Bazze opened 8 years ago

Bazze commented 8 years ago

Hello!

I get the following error when building:

Scanning dependencies of target io-ls
[ 38%] Building CXX object io/applications/CMakeFiles/io-ls.dir/io-ls.cpp.o
/path/to/comma/io/applications/io-ls.cpp:73:18: error: use of undeclared identifier 'TCP_ESTABLISHED'
    std::cout << TCP_ESTABLISHED <<  ",ESTABLISHED" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:74:18: error: use of undeclared identifier 'TCP_SYN_SENT'
    std::cout << TCP_SYN_SENT <<  ",SYN_SENT" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:75:18: error: use of undeclared identifier 'TCP_SYN_RECV'
    std::cout << TCP_SYN_RECV <<  ",SYN_RECV" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:76:18: error: use of undeclared identifier 'TCP_FIN_WAIT1'
    std::cout << TCP_FIN_WAIT1 <<  ",FIN_WAIT1" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:77:18: error: use of undeclared identifier 'TCP_FIN_WAIT2'
    std::cout << TCP_FIN_WAIT2 <<  ",FIN_WAIT2" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:78:18: error: use of undeclared identifier 'TCP_TIME_WAIT'
    std::cout << TCP_TIME_WAIT <<  ",TIME_WAIT" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:79:18: error: use of undeclared identifier 'TCP_CLOSE'
    std::cout << TCP_CLOSE <<  ",CLOSE" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:80:18: error: use of undeclared identifier 'TCP_CLOSE_WAIT'
    std::cout << TCP_CLOSE_WAIT <<  ",CLOSE_WAIT" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:81:18: error: use of undeclared identifier 'TCP_LAST_ACK'
    std::cout << TCP_LAST_ACK <<  ",LAST_ACK" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:82:18: error: use of undeclared identifier 'TCP_LISTEN'
    std::cout << TCP_LISTEN <<  ",LISTEN" << std::endl;
                 ^
/path/to/comma/io/applications/io-ls.cpp:83:18: error: use of undeclared identifier 'TCP_CLOSING'
    std::cout << TCP_CLOSING <<  ",CLOSING" << std::endl;
                 ^
11 errors generated.
make[2]: *** [io/applications/CMakeFiles/io-ls.dir/io-ls.cpp.o] Error 1
make[1]: *** [io/applications/CMakeFiles/io-ls.dir/all] Error 2
make: *** [all] Error 2

My OS:

$ uname -a
Darwin MacBookPro10,2-5026 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64

I solved it for now by just commenting those lines out (since I won't be using that anyway), but I just wanted to let you know.

Cheers!