Using sem_open, sem_close, sem_post and sem_wait in my c++ file.

compiled using command below:

g++ -g -I/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include -L
/usr/lib/ -B /usr/lib/sparcv9/libpthread.so hello.cpp -o hello

But get the output below:

Undefined                       first referenced
 symbol                             in file
sem_close                           /var/tmp/cc9j0Eif.o
sem_open                            /var/tmp/cc9j0Eif.o
sem_post                            /var/tmp/cc9j0Eif.o
sem_wait                            /var/tmp/cc9j0Eif.o
ld: fatal: Symbol referencing errors. No output written to hello
collect2: ld returned 1 exit status
g++: file path prefix `/usr/lib/libpthread.so' never used

May I know what is wrong? and how can I find out which library are all
these semaphore functions in? The man page doesn't help much :(

TIA.

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to