[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: your mail



On Sun, Nov 28, 1999 at 01:52:32AM +0000,  Rafał Szulim wrote:
> 
> Dopiero niedawno zainstalowałem debiana 2.1 na moim PC i nie bardzo wiem jak 
> dokładnie korzystać w kompilatora gcc.
> Wedle tego co się oriętuję to kompilacja programu przebiega poprawnie, 
> niestety nie udaje mi się uruchomić póżniej programu skompilowanego.

If you would like to get a polish response, please use the comp.os.linux.pl
newsgroup, which is dedicated to the polish-speaking linux users...

> 
> I'm a new user debian 2.1 and I have a problem with my gcc compilator. I 
> don't now why my compiled programs don't run.
> 
Could you give more detailed description of your problem?

Now let's check if you really cano not get the working program:
1) Make the directory for your sources, and compiled program
  mkdir ~/moj_program
2) Go to this directory
  cd ~/moj_program
3) With your favorite editor prepare the source (let's make it in the
   file testc.c):
====== START OF THE SOURCE CODE (REMOVE THIS LINE) ======
#include <stdlib.h>
#include <stdio.h>
void main()
{
  printf("A jednak dziala!!!\n");
}
====== END OF THE SOURCE CODE (REMOVE THIS LINE) ======

4) Compile your source
 gcc -o testc testc.c

5) Run your program
 ./testc

You should get the message "A jednak dziala!!!" on your terminal.

There are two traps in 4) and 5) steps.
- If you don't use the -o option int 4th step, your compiled program will have
  the "a.out" filename.
- You have to use the "./" before the name of your program, because the current
directory IS NOT included in your path. (Don't change it, it is good for security
reasons).  
-- 
			Hope this helps
			Wojciech Zabolotny
			http://www.ise.pw.edu.pl/~wzab

http://www.debian.org  Use Linux - an OS without "trojan horses" inside


Reply to: