gcc problem: standard libs not found
Hi.. I'm a beginner with Linux and C programming, but I have a fairly huge problem..
I started out with this code:
Anyone out there know how to make sense of this?
EDIT: Blah.. I found the package for libc++-dev and installed it finally. The only one so far which required the CD. Things work now. :P
I never expect variants of Ubuntu to ship with development libraries. I don't have a Linux system at hand, but I think you need to have libstd installed.
If you run find / -type f -name 'stdio.h' -print, you will be able to establish whether the standard C library is present on your system or not.
hmm, sounds like you will need to download the development packages
(which will have all the header files),
strange though you have the compiler but no header files????
go into synaptic and look under development.
You need the build-essentials package, get it via Synaptic or apt-get.
I installed the dev packages. Programs compile now, heh. I still think it's weird that gcc would be installed but not the header files. :P
I am having the same problem and found several references to the proper resolution. I have Ubuntu 7.04 running on a desktop machine and so far everything seems to work. This missing stdio.h file, etc. seems to be a fact of life with this, and maybe other, distro. However, on my machine, if I run
sudo apt-get install build-essential
I get the following errors:
------------ Start of quote
Some packages could not be installed. This may mean you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or moved out of Incoming.
Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help resolve the situation:
The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or libc-dev
Depends: g++ (>= 4:4.1.1) but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
E: Broken packages
------------------ End quote
So... does anyone know how to proceed on this? '
This question would probably be better asked on the Distributions:Ubuntu forum, but this thread already existed.
I've redirected this to another forum since it doesn't really belong here. Sorry for the messup...
Try installing the g++
and then compile ur c programs on gcc.
It will work I suppose.
Prior to g++ installation we had these probs.
Once g++ was put in the files like stdio.h etc came in with the g++ lib
good luck try. it....
May be this solution may not be upto the mark for many!
|All times are GMT -5. The time now is 06:33 AM.|