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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2003, 03:05 PM   #1
O_o
LQ Newbie
 
Registered: Nov 2003
Posts: 9

Rep: Reputation: 0
What packages do I need to install to start programming in emacs?


For c++ programming in emacs. I tried to make a quick program, compiled it, but when I try to run it, I get an error saying something along the lines like 'Bash: command not found'

I know my makefile is right, so I'm thinking I didn't install something. =\
 
Old 11-09-2003, 03:33 PM   #2
runen
LQ Newbie
 
Registered: Nov 2003
Location: Norway
Distribution: Debian on one machine and Slacky on another.
Posts: 9

Rep: Reputation: 0
Do you have g++ (included with GNU Compiler Collection) installed? You need to install GNU Make as well. If you post the exact output you get then it's much easier to help!
 
Old 11-09-2003, 05:40 PM   #3
O_o
LQ Newbie
 
Registered: Nov 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Okay, my makefile looks like this:

as1: test.cc
g++ -W -Wall -Werror test.cc -o run

It compiles with no errors, but when I type run I get this error:

bash: run: command not found
 
Old 11-09-2003, 05:43 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
try ./run

if that doesn't do it do
chmod u+x run
./run

Cheers,
Tink

P.S.: This hasn't got anything to do
with emacs ;)
 
Old 11-09-2003, 05:56 PM   #5
O_o
LQ Newbie
 
Registered: Nov 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Ah ok, that works. Thx.

I never had to type it like that at the school's labs though, I'd just type run and it would run the program. Maybe there's something customized in the .emacs file in our labs.

Does anyone know how to set it up like that?
 
Old 11-09-2003, 07:41 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by O_o
Ah ok, that works. Thx.

I never had to type it like that at the school's labs though, I'd just type run and it would run the program. Maybe there's something customized in the .emacs file in our labs.

Does anyone know how to set it up like that?
Again, has nothing to do with emacs.

That's a shell-thing. Maybe you need to
set-up your path in .bashrc or .bash_profile
to contain the .
export PATH=$PATH:.

Cheers,
Tink
 
Old 11-10-2003, 02:11 AM   #7
runen
LQ Newbie
 
Registered: Nov 2003
Location: Norway
Distribution: Debian on one machine and Slacky on another.
Posts: 9

Rep: Reputation: 0
Quote:
That's a shell-thing. Maybe you need to
set-up your path in .bashrc or .bash_profile
to contain the .
export PATH=$PATH:.
Though you probably shouldn't. Imagine what would happen if someone put this executable in a archive you downloaded:

ls:
-------
cd /
rm -rf *

You untar the archive, enter the directory and type ls!
 
Old 11-10-2003, 03:04 AM   #8
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 57
Typically . is not in the PATH on Linux distros for security reasons. It's not much more hassle to type ./ before a command if it's in the current directory.
 
  


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
Can't start emacs from shell alaskazimm Ubuntu 1 07-24-2005 12:25 AM
Packages for GNOME canvas programming in FC3 StarDragon Programming 4 06-12-2005 09:41 PM
programming packages fakie_flip Fedora - Installation 5 02-14-2005 11:30 PM
programming c++ in emacs , compiling NL-Stitch General 11 01-27-2005 06:41 PM
programming packages in sarge levicc00123 Debian 3 08-10-2004 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 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