[Courses] C Programming For Absolute Beginners, Lesson 2: Fun With Printf, Scanf, Puts, and Variables

Carla Schroder carla at bratgrrl.com
Tue Feb 28 22:48:46 UTC 2012


On Tuesday, February 28, 2012 03:58:30 PM Emily Gonyer wrote:
> Hey Carla, I did lesson 1 and have been busy and am just getting to lesson
> 2, but all of a sudden, after I compile the program, when I go to run them
> my terminal just says 'command not found'... what am I doing wrong?
> 
> Emily

There are a couple of possibilities, depending on what you're doing. In Lesson 
1 I described my workflow, which is copying my new executables to 
/home/carla/cfiles, and then entering this directory in my path. Then I compile 
my new executable directly into this directory, like this:

$ gcc -o /home/carla/cfiles/howold2 howold2.c

Then I can run my new program just like any other command:

$ which howold2
/home/carla/cfiles/howold2

$ howold2
[program output]

I imagine other people have different setups, which would be good to know about 
(HINT!). 

Does that help? What steps are you following?

best,
Carla

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
ace Linux nerd
author of Linux Cookbook,
Linux Networking Cookbook,
Book of Audacity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Courses mailing list