When I try to build tcpservice.ccp with
g++ -lz -ldl -lpthread -lccxx tcpservice.cpp
I get a syntax error before ";" in /usr/include/cc++/thread.h : 177
But I can build tcpservice into demo folder from source code (and it works fine)
Any idea ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You have to watch which compiler flags are required for your target platform. Currently /usr/include/cc++/config.def holds all the correct compile and link options to use.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I try to build tcpservice.ccp with
g++ -lz -ldl -lpthread -lccxx tcpservice.cpp
I get a syntax error before ";" in /usr/include/cc++/thread.h : 177
But I can build tcpservice into demo folder from source code (and it works fine)
Any idea ?
You have to watch which compiler flags are required for your target platform. Currently /usr/include/cc++/config.def holds all the correct compile and link options to use.
That's what is in my config.def file
flags:-D_REENTRANT -D_THREAD_SAFE -O2 -fsigned-char -D_GNU_SOURCE
link: -pthread
load:-ldl
extra:-lz
I try to build tcpservice with :
g++ -lz -ldl -lpthread -lccxx -lccstd -lccio tcpservice.cpp
And then I got the error in thread.h.
And, using those flags, I can build tcp.cpp from demo section.
Could someone tell me if I forgot a flag. Sorry, I'm not an expert in compilation, and I don't really understand what config.def tell.
Hi again,
I solved myself my problem. Building seems to work OK under LinuxPPC 2000 with those flags.
g++ -D_REENTRANT -D_THREAD_SAFE -O2 -fsigned-char -D_GNU_SOURCE -pthread -ldl -lz -lccxx tcpservice.cc