LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What packages do I need to install to start programming in emacs? (https://www.linuxquestions.org/questions/linux-newbie-8/what-packages-do-i-need-to-install-to-start-programming-in-emacs-114173/)

O_o 11-09-2003 03:05 PM

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

runen 11-09-2003 03:33 PM

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!

O_o 11-09-2003 05:40 PM

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

Tinkster 11-09-2003 05:43 PM

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

O_o 11-09-2003 05:56 PM

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?

Tinkster 11-09-2003 07:41 PM

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

runen 11-10-2003 02:11 AM

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!

mhearn 11-10-2003 03:04 AM

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.


All times are GMT -5. The time now is 01:34 PM.