Hi,
I have a C++ cgi search application (semaphoreserver) that links against
a static library, that I build. The source code for this static library
consists of some C++ code (.cc extension) and some C files (.c)
extension. When I initially compiled the static library I got an error
relating to gxx_personality_v0. I managed to overcome this by linking
with -lstdc++.
However, when I run the cgi program the webserver logs report the error
ld.so.1: /usr/local/apache2/cgi-bin/semaphoreserver: fatal:
libstdc++.so.5: open failed: No such file or directory
The webserver runs as user nobody and has no environment. I can overcome
this problem by using the Apache SetEnv directive in httpd.conf to set
LD_LIBRARY_PATH. However, I cannot guarantee that all webservers the
application runs on will either be configured this way, or even that the
shared library libstdc++.so.* will exist on the machine.
Two questions, therefore.
1) Can I overcome the initial error (gxx_personality...) in another way
(e.g. is there a compiler flag I can set) so that I don't have to link
against the shared library libstdc++.so.
2) If the answer to (1) is no (or even if it's yes), is there a way in
which I can link against a shared library so that it is in fact
statically linked and thus not need at runtime?
Thanks in advance.
Mike
--
___________________________________________________
Michael Gatford
APR Smartlogik Support
___________________________________________________
APR Smartlogik Limited.
Rustat House - Clifton Road - Cambridge - CB1 7EJ
phone +44 (0)1223 27 1025
fax +44 (0)1223 27 1010
map: http://www.aprsmartlogik.com/contact/CambridgeMap.pdf
mailto:support@xxxxxxxxxxxxxxxxx
http://www.aprsmartlogik.com/
***********************************************************************
This e-mail may contain proprietary and confidential
information and is intended for the recipient(s) only.
If an addressing or transmission error has misdirected this
e-mail, please notify the systems administrator by forwarding
this e-mail to mailto:postmaster@xxxxxxxxxxxxxxxxxx
If you are not the intended recipient(s) disclosure, distribution,
copying or printing of this e-mail is strictly prohibited.
***********************************************************************