tags:

views:

360

answers:

2

Hello,

I'm working on a Ubuntu 8.04 / 32 bit (as virtual machine). While performing some makes on a project that is not min, I get the error:

g++: /usr/lib/libstdc++.a: No such file or directory

What should I do? the gcc package is installed through synaptic, what do i miss?

Thanks, Lucian

+1  A: 

For Ubuntu 8.04 (aka hardy), you need to install the libstdc++6-4.2-dbg package.

$ sudo aptitude install libstdc++6-4.2-dbg

If you need to find files like this in future, install apt-file if it isn't already installed and use apt-file search.

$ sudo aptitude install apt-file
...
$ sudo apt-file search /usr/lib/libstdc++.a
Phil
This is not entirely correct (1) he needs -dev package, not -dbg (2) it is not needed to sudo while running apt-file (3) the -4.2- is his g++ version, so if he uses g++ 4.3, he'd need libstdc++6-4.3-dev
jpalecek
Thanks for replay. sudo apt-file search /usr/lib/libstdc++.a does not report anything. sudo aptitude install libstdc++6-4.2-dbg does not add a .a file, just some .so files. Should I change the link options to point to the so files? Sorry, I do not know the difference between so and a libs.
lmsasu
-dev package installed, no change. I use gcc 4.2.4.
lmsasu
the path to the /usr/lib/libstdc++.a file was wrong in the linker options. actually, it is /usr/lib/debug/libstdc++.a. This was found out with apt-file search. Thanks, Phil and jpalececk.
lmsasu
A: 

It seems you are developing in C++, as "++" in the name of the library suggests. In this case, you'll need to install g++ as well, guess this will install the required library, among other things.

To install gcc, g++, and other utilities like make in one step, you can install build-essential meta-package.

You may also find these packages useful, as they install related documentation: glibc-doc manpages-dev gcc-4.2-doc libstdc++6-4.2-doc

dmityugov