Solved

gcc - missing headers and libraries

Posted on 2000-04-03
1
308 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
qos on linux 3 96
tallylog file 2 2,748
shell script working with --daemon 18 93
Using init script with Systemd: need help crafting unit file 11 76
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

929 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

13 Experts available now in Live!

Get 1:1 Help Now