[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with G++ on Solaris

From: ckkwan
Subject: Help with G++ on Solaris
Date: 16 Dec 2006 20:59:42 -0800
User-agent: G2/1.0

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/ 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/' 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 :(


reply via email to

[Prev in Thread] Current Thread [Next in Thread]