Page 1 of 1 [ 7 posts ] 

slaparoundmypeers
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 19 Dec 2010
Age: 36
Gender: Male
Posts: 49

05 Mar 2011, 11:25 pm

i recently installed Fedora (redhat) linux on my laptop from the 'a pratical guide to Redhat Linux'. after a week of exploring Fedora Core i decided to try some C++ assembly language programming in the EMACS application. i used the text editor and copyied the hello world example from the book. i then saved the file as example.cc and reopened it with emacs. i chose to compile it and start the minibuffering but the error message no target object no make file. so i skip to the back of the book about making a



slaparoundmypeers
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 19 Dec 2010
Age: 36
Gender: Male
Posts: 49

05 Mar 2011, 11:36 pm

sorry about that my psp is so gay. about making a makefile for UNIX. i create one and tried it on emacs again but it displayed the same error message as before. so i'm wondering if anyone who uses linux can help me out here and please be nice about it. i don't need rudeness i need advice.



Darth_Aspie
Hummingbird
Hummingbird

User avatar

Joined: 24 Oct 2008
Age: 34
Gender: Male
Posts: 19

06 Mar 2011, 2:30 am

The UNIX server in my school's Computer Science lab has the makemake and gmakemake utilities installed, which produce makefiles for you. So, for example, running "gmakemake > Makefile" from the command line (in the same folder as the C++ code) would produce a makefile for you, then running "make" would compile the code. You'd do the latter again every time you saved changes to the code, but the former only when you added a new code file.

I'm not a hardcore UNIX user (I tend to stick to Windows machines, for gaming) so I'm not sure if these come preinstalled or will even work on your system. I'll look into this more if I get a chance.



Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

06 Mar 2011, 2:54 am

Those packages likely are not installed by default on a Fedora system. You'll want to head to your package manager and install the packages Darth_Aspie mentioned, along with gcc, g++ and all the rest if they aren't already.

My first bet would be to open a terminal, use "su" to become root, and type "yum install g++" to make sure you have the proper compiler.

A few random questions/comments:

Quote:
after a week of exploring Fedora Core

It hasn't been Fedora Core in years; do you have the most recent version?
Quote:
C++ assembly language programming

C++ is not assembly language.
Quote:
i used the text editor and copyied the hello world example from the book. i then saved the file as example.cc and reopened it with emacs.

Emacs is a text editor. Were you using Gedit (labeled "text editor" in your Applications menu) to write the code, and Emacs to compile/execute it? I would write the code in any text editor (I use vim, but to start off with Gedit is fine) and compile it on the command line, with "g++ example.cc" in the appropriate directory.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH


slaparoundmypeers
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 19 Dec 2010
Age: 36
Gender: Male
Posts: 49

06 Mar 2011, 8:27 am

well i know that fedora 2.6 is old but i chose it over Windows XP because the latter is way too slow on my dell latitude. i also have a problem with connecting to the internet. i dont think it has my network card type since it's newer. and how do you access your flash card files once you plug it into your computer? i plug it in and use the file browser to find the pictures and music from windows (i have 2 harddrives). i was thinking of becomming a WhiteHat also any suggestions ????



LordoftheMonkeys
Veteran
Veteran

User avatar

Joined: 15 Aug 2009
Age: 35
Gender: Male
Posts: 927
Location: A deep,dark hole in the ground

06 Mar 2011, 12:36 pm

The extension is supposed to be .cpp, not .cc. As for the Makefile, I don't know why you would need one. What compiler are you using? Is it gcc?


_________________
I don't want a good life. I want an interesting one.


Orwell
Veteran
Veteran

User avatar

Joined: 8 Aug 2007
Age: 35
Gender: Male
Posts: 12,518
Location: Room 101

06 Mar 2011, 1:33 pm

slaparoundmypeers wrote:
well i know that fedora 2.6 is old

There was never anything called Fedora 2.6. That might be your kernel version. Could you paste the output of "uname -a" here?

Quote:
i also have a problem with connecting to the internet. i dont think it has my network card type since it's newer.

More likely, your network card requires proprietary drivers. That can be handled in Fedora with some difficulty, though Mint would be easier.

Quote:
and how do you access your flash card files once you plug it into your computer? i plug it in and use the file browser to find the pictures and music from windows (i have 2 harddrives).

Once you plug in the flash drive it should just show up on your desktop. If not, open a file browser window and it will be in the side panel.


_________________
WAR IS PEACE
FREEDOM IS SLAVERY
IGNORANCE IS STRENGTH