Hey all,
Okay so I have loaded Ubuntu, installed all the development tools I will need which includes:
* gcc
* gdb
* kdbg (IDE for gdb)
* codeblocks  (learning assembly to optimize my C++ applications and therefore need an IDE for C, C++)
* objdump
* gprof
* binutils (using "sudo aptitude install binutils")
Posted on 2010-08-21 10:02:28 by v0rtex
Two options:

1.) Use a fully qualified path.
2.) Use cd to change directories to the path of the file.
Posted on 2010-08-21 11:36:34 by SpooK
I don't know whether it comes with Ubuntu or not, but there's a utility called "midnight commander"... just type "mc" to fire it up. I found it very helpful for "beginner navigation" (and much more).

In one place you refer to your file as "test.c", and in another "ctest.c" - that'll do it, of course! Unix is case sensitive - "Ctest.c" != "ctest.c", for example. What do you see if you just type "ls"?

Hang in there, v0rtex! Linux is pretty confusing at first, but it begins to make sense fairly soon...

Best,
Frank

Posted on 2010-08-22 12:09:55 by fbkotler
After all this I get: gcc: ctest.c: No such file or directory


So, in that case, gcc isn't able to find your file; it's probably in the wrong directory. It seems, you're not very familiar with the command line. Check first, if youre tools are properly installed. Type at the command line:

$ gcc --version



Result should be a version number 4.2.4 or similar. After that, check if your C file in the same directory. Command line:

$ ls


That should do the job (ls = list files inside a directory). Your C file should be there.

Your command line for building the running application is okay:

$ gcc -o ctest ctest.c


If that's done without errors, fire up your program with:

$ ./ ctest


That's all. There are a lot tools available under Unix. As fbkotler wrote: The mc (midnight commander) should be a great helper for you, to navigate inside the file system. If you're familiar with tho old Norton Commander, mc has the same behaviour and a lot mor functionality.

Good luck.

Gunther

Posted on 2010-08-22 17:21:38 by Gunther
I think you should read something like http://mally.stanford.edu/~sr/computing/basic-unix.html to learn more about the command line environment.
Posted on 2010-08-24 07:36:02 by roticv