LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora - Installation (https://www.linuxquestions.org/questions/fedora-installation-39/)
-   -   SRPMS installation (Urgent Case) (https://www.linuxquestions.org/questions/fedora-installation-39/srpms-installation-urgent-case-288287/)

driverm 02-09-2005 05:15 PM

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...

reddazz 02-09-2005 06:58 PM

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.

misc 02-13-2005 03:10 AM

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>

reddazz 02-13-2005 03:39 AM

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;
}


All times are GMT -5. The time now is 07:11 AM.