RE: backward _warning and failure to execute

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

 



Jeff,

The warning you're getting is due to the fact that the source code is
not compliant with the latest ANSI standard for C++.  Bascially, with
the new standard, standard C++ headers no longer have the ".h"
extension.  For example, the old "iostream.h" is now "iostream".
However, the old headers are supported for the time being for backward
compatibility; they just generate the warning you are seeing below.

This warning is not the cause of your problem, however.  The problem is
that the C++ runtime library is not in one of the standard system
directories, so when you run the program it is not able to find it.
What you need to do is to add the directory containing libstdc++.so.5 to
your LD_LIBRARY_PATH variable before running the program.  For example,
if that library is in /usr/local/lib, then you would do something like
this:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Or, you could change your Makefile so that this path gets embedded in
the executable (which is probably preferable) by adding the following
argument to the LD_FLAGS variable:

-Wl,-rpath,/usr/local/lib

If it complains about that, then try 

-R/usr/local/lib

Of course, you need to replace /usr/local/lib with the correct directory
for your installation.

Cheers,
Lyle


-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Gruen Lab
Sent: Tuesday, January 20, 2004 1:33 PM
To: gcc-help@xxxxxxxxxxx
Subject: backward _warning and failure to execute

Hello,

I am trying to compile a genetics analysis program ("transmit") on a 
sun station running SunOS5.9.  I believe that it has version 3.2 of 
c++, and version 3.2 of gcc.  There is a Makefile bundled with the 
program.  When I run "make" I get the following error messages:

gruen@/home/gruen/Applications/transmit-2.5.4% make
g++ -c   -DVERSION="\"2.5.4, Aug 2002\"" -DSEED=srand48 transmit.C
In file included from /usr/local/include/c++/3.2/backward/iostream.h:31,
                  from transmit.C:5:
/usr/local/include/c++/3.2/backward/backward_warning.h:32:2: warning: 
#warning This file includes at least one deprecated or antiquated 
header. Please consider using one of the 32 headers found in section 
17.4.1.2 of the C++ standard. Examples include substituting the <X> 
header for the <X.h> header for C++ includes, or <sstream> instead of 
the deprecated header <strstream.h>. To disable this warning use 
-Wno-deprecated.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux