public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dave Topham <dtopham@csuhayward.edu>
To: help-gcc@gnu.org
Subject: libstdc++.so
Date: Sat, 11 Dec 1999 12:50:00 -0000	[thread overview]
Message-ID: <3852B61E.1071E293@csuhayward.edu> (raw)
In-Reply-To: <3850F092.3F08B0EF@icn.siemens.de>

I am trying to compile and link my c++ program using g++ (gcc) on one unix
machine (SunOS) then ftp the executable to another unix machine (also
SunOS). When I do that I get this error msg:
ld .so.1 : pgmname : fatal libstdc++.so.2.8.1 "can't open file error-2"

With the help of my sysadmin I figured out that there is a run-time lib
needed to run c++ programs on unix!
(Got to learn sometime)
Anyway, I can set LD_LIBRARY_PATH to the directory where libstdc++.so.2.8.1
resides and then it's OK.

What I want to do instead is to link with the lib path included in the
program itself. I found some info
that seemed to indicate that I can compile/link with options such as -R  or
-rpath  or to set the environment
variable LD_RUN_PATH to force that to be used as run-time lib path, but
none of these option seem to work for me yet.
Has anyone tried to do this using GNU c++ compiler/linker?

I think if I can do this, then when I move my program to the new machine
(which does not have the stdlibc++.so in the same path as it is on the
linking machine),
I can get it to run OK without setting LD_LIBRARY_PATH.

I have tried several attempts:
1) env LD_RUN_PATH=   (the path on the target machine where libstdc++.so
resides)
   then compiling with no options    (seemed to have no effect)
2) using -R option
3) using -rpath option
   (these don't seem to be supported under GNU c++?)

The reason for not wanting to set LD_LIBRARY_PATH is because that can only
be done per user, but I want to invoke my program remotely from a cgi bin
via the web server -- and it doesn't have the path to the lib

Thanks for any suggestions, I appreciate it very much, -Dave



WARNING: multiple messages have this Message-ID
From: Dave Topham <dtopham@csuhayward.edu>
To: help-gcc@gnu.org
Subject: libstdc++.so
Date: Fri, 31 Dec 1999 22:24:00 -0000	[thread overview]
Message-ID: <3852B61E.1071E293@csuhayward.edu> (raw)
Message-ID: <19991231222400.ZWdgn2XrW8euoWeCzyy_7wGYKUzLcNhxHGjUhonpqfo@z> (raw)
In-Reply-To: <3850F092.3F08B0EF@icn.siemens.de>

I am trying to compile and link my c++ program using g++ (gcc) on one unix
machine (SunOS) then ftp the executable to another unix machine (also
SunOS). When I do that I get this error msg:
ld .so.1 : pgmname : fatal libstdc++.so.2.8.1 "can't open file error-2"

With the help of my sysadmin I figured out that there is a run-time lib
needed to run c++ programs on unix!
(Got to learn sometime)
Anyway, I can set LD_LIBRARY_PATH to the directory where libstdc++.so.2.8.1
resides and then it's OK.

What I want to do instead is to link with the lib path included in the
program itself. I found some info
that seemed to indicate that I can compile/link with options such as -R  or
-rpath  or to set the environment
variable LD_RUN_PATH to force that to be used as run-time lib path, but
none of these option seem to work for me yet.
Has anyone tried to do this using GNU c++ compiler/linker?

I think if I can do this, then when I move my program to the new machine
(which does not have the stdlibc++.so in the same path as it is on the
linking machine),
I can get it to run OK without setting LD_LIBRARY_PATH.

I have tried several attempts:
1) env LD_RUN_PATH=   (the path on the target machine where libstdc++.so
resides)
   then compiling with no options    (seemed to have no effect)
2) using -R option
3) using -rpath option
   (these don't seem to be supported under GNU c++?)

The reason for not wanting to set LD_LIBRARY_PATH is because that can only
be done per user, but I want to invoke my program remotely from a cgi bin
via the web server -- and it doesn't have the path to the lib

Thanks for any suggestions, I appreciate it very much, -Dave



  parent reply	other threads:[~1999-12-11 12:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-10 21:48 gcc on different platforms Daniel Schnell
1999-12-11 11:10 ` Tim Prince
1999-12-31 22:24   ` Tim Prince
1999-12-11 12:50 ` libstdc++.so Dave Topham
1999-12-31 22:24   ` libstdc++.so Dave Topham
1999-12-11 12:50 ` Dave Topham [this message]
1999-12-31 22:24   ` libstdc++.so Dave Topham
1999-12-11 12:50 ` libstdc++.so Dave Topham
1999-12-31 22:24   ` libstdc++.so Dave Topham
1999-12-31 22:24 ` gcc on different platforms Daniel Schnell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3852B61E.1071E293@csuhayward.edu \
    --to=dtopham@csuhayward.edu \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).