[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc
Subject: Re: Question
From: Bo Thorsen <bo () sonofthor ! dk>
Date: 2000-10-05 15:27:44
[Download RAW message or body]
On Thu, 5 Oct 2000, Sampson, Michael J. wrote:
> Hello,
> Currently I am working on a project that consists of Fortran, C, C++
> and a front end which is written in C++. I am having trouble with linking
> all of my object files I have built. I've spent some time reading through
> the GNU GCC and G77 manuals on your web site. Right now I seemed to be stuck
> where I'm trying to do the final linking stage with gcc. No matter how I
> arrange the linking part I am getting undefined symbol references. If I try
> to do the linking with g++, I get Fortran undefined reference symbols, if I
> try to the linking with g77, I get C++ undefined references (iostream).
> Could the GNU GCC group perhaps guide in a direction to resolve this issue?
When you use gcc to link c++ programs, you have to include the libstdc++
yourself -- this is one of the differences between gcc and g++. Simply add
the -lstdc++ flag to LFLAGS, and you should be rid of the iostream
problems.
Bo.
--
Bo Thorsen
bo@sonofthor.dk
Lahnsgade 31, st.
DK-5000 Odense C
Tlf: +45 66 11 83 85
Rule one of good programmers: anything You can do, I can do better
Rule two of good programmers: anything I can do, You can do better
The Programming Theorem: anything worth doing is worth doing over and over again
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic