Solved

gcc - missing headers and libraries

Posted on 2000-04-03
1
305 Views
Last Modified: 2010-04-21
These ought to be easy for those familiar with gcc :)

if I try to compile:

#include <stdio.h>
int main()
{
puts("Hello world\n");
return 0;
}

gcc reports:

test.cpp: stdio.h: File or directory not found.

Then I tried to exclude the dependency on the header file:

int main()
{
return 0;
}



and gcc seems to compile but does not link:

/usr/bin/ld: cannot open crt1.o: File or directory not found

From / I search:
find -name crt1.o
and
find -name stdio.h
and the files are not found.

So, my questions are:

1) Which RPM contains the headers and libraries?

2) What would ba a "standard" place to put these?

3) What is the most straightforward way to inform gcc of their location, other than options or makefiles? Is there an environment variable I can set for each?
0
Comment
Question by:Remote040300
1 Comment
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 2687997
The include files should be in /usr/include and the libs would be in /usr/lib. On a Linux system these should have been installed by default if your installation was done in a way as to select a "workstation" type of install. If you did some sort of custom install where you picked only what you thought you needed, then you need to go back and install the "developers" support items. Using a Gui package manager, like kpackage or gnorpm, will make it easier to figure out what else needs to be added.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now