From: Mitch D. <md...@po...> - 2000-11-02 06:12:02
|
Jaswinder Singh wrote: > > Dear Stuart , Stephen and linuxsh-dev group, > > I compiled simple C++ Hello world program as :- > > sh-linux-gnu-g++ -ml -m3 hello.cpp > > but i get :- > > /opt/hardhat/devkit/sh/sh3/lib/gcc-lib/sh-linux-gnu/2.95.2/libstdc++.a(iostream. > o): In function `istream::get(char &)': > /home/heywood/users/thomass/testbuild-0.2/BUILD/gcc-2.95.2/libio/iostream.cc:91: > undefined reference to `_pthread_cleanup_push_defer' > /home/heywood/users/thomass/testbuild-0.2/BUILD/gcc-2.95.2/libio/iostream.cc:91: > undefined reference to `_pthread_cleanup_pop_restore' Hi Jaswinder, I'm not an expert in such things, but it appears that all the unresolved symbols are of the form, "_pthread_*". So it looks to me as if your program uses pthreads, but is not specifying that the program should be linked against the pthread library. Just as a guess, try adding -lpthread to your compile line. > Do You Yahoo!? > > From homework help to love advice, Yahoo! Experts has your answer. > http://experts.yahoo.com/ You may be interested to know that this Yahoo advertisement contravenes RFC822, the standard for mail message exchange, because it starts the line with "From ". Starting a line with "From " indicates the start of a new message. If a message contains a From at the start of the line, it should be escaped with ">", ie, ">From ". While I know there's nothing you can do about it, failure to quote the "From " causes problems with many mail readers, such as Netscape, which is what I use. Regards, Mitch. |