Solved

Library Issue

Posted on 2006-10-19
1
149 Views
Last Modified: 2010-04-01
I am compiling an application with gcc 3.3.5 (built from its sources) and in the middle of the compilation, the source refers to "basic_string.h" header, and the linker wants to look into the /usr/include/c++/4.1.2/bits/ folder for the real function to link, but the source invokes a wrong overload of the function.
 
Why is gcc 3.3.5 is looking for the library into the wrong path?

I guess I am having more than one version of the same library (libstdc++), and consequently, more than one way to get the library to link from.

How can we change this behavior? I need to build the application with gcc 3.3.5 built from its source (there was no Debian package for gcc-3.3.5), and I need to know how to link from the correct library.

The compiler is finding the header into /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/
It seems to go from /usr/lib/gcc/i486-linux-gnu/4.1.2 to /usr//usr/lib/gcc/i486-linux-gnu/4.1.2?
0
Comment
Question by:superfly18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 17

Accepted Solution

by:
rstaveley earned 500 total points
ID: 17800326
It looks like you've still got headers from 4.1.2 in your include path.

Can I suggest that you build gcc-3.3.5 again, but this time pass (say) the parameter...

    --prefix=/home/superfly18/gcc-3.3.5                       <- Or whatever your home dir is

...to the ./configure script. That will put your installation into a separate place which doesn't get entangled with your Debian defaults. When you then make your application, you can set up your path to prefer the binaries in this directory, and this directory should be set up with everything gcc-3.3.5-ish and not at all 4.1.2-ish.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C++ assignment question 7 268
Focus not getting shifted out of  editbox 2 69
Grammars for C C++ and java 1 139
HTTPSendRequest with WinINet delays on first call 11 83
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question