Solved

gcc - missing headers and libraries

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

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 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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

813 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

18 Experts available now in Live!

Get 1:1 Help Now