WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Linux, UNIX, Open Source (http://www.wcm.at/forum/forumdisplay.php?f=13)
-   -   Gcc unter Ubuntu 7 (http://www.wcm.at/forum/showthread.php?t=227501)

dimonfranz 24.03.2008 15:06

Gcc unter Ubuntu 7
 
Hallo,
ich habe ein Problem. ich versuche gerade eine c-Datei mittels Gcc zu kompilieren.

gcc -o Hello Hello.c

Nach dem Kompilieren wird eine Datei "Hello" erstellt, die eigentlich vom Terminal ausgeführt werden muss. Aber wenn im Terminal "Hello" eintippe bekomme ich so was raus: "bash: Hello: command not found".
Kann mir jemanden weiter helfen?

colossus 24.03.2008 16:25

. (dein Current Working Directory) ist nicht in deinem PATH.

Code:

./Hello
hilft, weil du deiner Shell mit "./" sagst, dass das Programm, das sie fuer dich ausfuehren soll, in dem Verzeichnis liegt, in dem du dich gerade befindest.

dimonfranz 24.03.2008 17:02

Vielen Dank es hat geklappt.


Alle Zeitangaben in WEZ +2. Es ist jetzt 01:34 Uhr.

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag