LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices


Reply
  Search this Thread
Old 02-09-2005, 05:15 PM   #1
driverm
LQ Newbie
 
Registered: Feb 2005
Posts: 13

Rep: Reputation: 0
Angry SRPMS installation (Urgent Case)


Hi. I am new to Linux. So my questions would be very silly for you all. Sorry about that...
- I have Fedora Core 3 installed on my machine and i have downloaded and copied 4 SRPM cd's. How am i going to install these 4 cd's to Fedora?

- I have a temp.c file that is;
#include <iostream>
int main()
{
printf("hello, world");
return 0;
}

on terminal when i compile it with gcc -g -Wall -o temp temp.c i get

hmw.c:1:20: iostream: No such file or directory
hmw.c: In function `main':
hmw.c:12: warning: implicit declaration of function `printf'

How can i fix this problem ? I think it is true...
Thanks Lot...
 
Old 02-09-2005, 06:58 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You can mount the CD's individually, change into the directory where the srpms are located and install them manually e.g.
#rpm -Uvh *srpm
will install them all. I also think you can use apt, add the CD's as your sources.
 
Old 02-13-2005, 03:10 AM   #3
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Quote:
hmw.c:1:20: iostream: No such file or directory
You need to install libstdc++-devel, which provides the C++ Standard Library headers. And for C++, use the g++ compiler from the gcc-c++ package. But your file is named like a C file, hence this is confusing anyway.
Quote:
hmw.c: In function `main':
hmw.c:12: warning: implicit declaration of function `printf'
This is a C Standard I/O function. You need to
Code:
#include <stdlib.h>
 
Old 02-13-2005, 03:39 AM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
It looks like you are mixing C++ and C. If it's a c file, it should be something like,
#include <stdio.h>
int main(void)
{
printf("hello, world");

return 0;
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting sLoPPy cASE to Pretty Case with tr lowpro2k3 Programming 4 04-13-2005 08:13 PM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 04:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 04:15 AM
!!URGENT!! Need help, about to attempt a dual boot installation!!! Ausar Linux - Newbie 3 10-03-2004 07:17 PM
Urgent! Need help with apache installation dipshikha Linux - Software 3 04-14-2004 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration