Hallo,
ich habe ein Problem, das hier zwar schon einmal aufgetaucht ist, aber in anderem Zusammenhang und vor allem nicht mit einer Lösung für mich.
Deswegen hier nochmal:
Ein C++ Programm wird von mir mit cpp compiliert. Es kommen keine Fehlermeldungen und auch die Ausgabedatei wird nach meinen Wünschen erstellt.
Wenn ich nun das Programm mit ./<Programm> aufrufe,
steht in der Kommandozeile nur:
wobei aaai hier mein sehr sinniger Programmname ist.
Das merkwürdige an dieser Sache ist, daß gestern alles funktioniert hat (allerdings mit anderem Quellcode). Das, was ich gestern compiliert habe, läßt sich heute ganz normal starten. Wenn ich das nun aber nochmal neu compiliere, kommt die gleiche Fehlermeldung.
Was ich nun schon ausprobiert habe, ist die Berechtigungen zu ändern.
Mit chmod +x kann ich das Programm nun starten (auch das war bis gestern noch nicht nötig).
Allerdings sehe ich dann das:
Und der Programmcode dafür ist:
Es sollte also eigentlich gar nichts kommen.
Für jeden Tip bin ich dankbar.
ich habe ein Problem, das hier zwar schon einmal aufgetaucht ist, aber in anderem Zusammenhang und vor allem nicht mit einer Lösung für mich.
Deswegen hier nochmal:
Ein C++ Programm wird von mir mit cpp compiliert. Es kommen keine Fehlermeldungen und auch die Ausgabedatei wird nach meinen Wünschen erstellt.
Wenn ich nun das Programm mit ./<Programm> aufrufe,
steht in der Kommandozeile nur:
Code:
bash: ./aaai: Keine Berechtigung
Das merkwürdige an dieser Sache ist, daß gestern alles funktioniert hat (allerdings mit anderem Quellcode). Das, was ich gestern compiliert habe, läßt sich heute ganz normal starten. Wenn ich das nun aber nochmal neu compiliere, kommt die gleiche Fehlermeldung.
Was ich nun schon ausprobiert habe, ist die Berechtigungen zu ändern.
Mit chmod +x kann ich das Programm nun starten (auch das war bis gestern noch nicht nötig).
Allerdings sehe ich dann das:
Code:
./testprog: line 56: enum: command not found
./testprog: line 58: __LC_CTYPE: command not found
./testprog: line 59: __LC_NUMERIC: command not found
./testprog: line 60: __LC_TIME: command not found
./testprog: line 61: __LC_COLLATE: command not found
./testprog: line 62: __LC_MONETARY: command not found
./testprog: line 63: __LC_MESSAGES: command not found
./testprog: line 64: __LC_ALL: command not found
./testprog: line 65: __LC_PAPER: command not found
./testprog: line 66: __LC_NAME: command not found
./testprog: line 67: __LC_ADDRESS: command not found
./testprog: line 68: __LC_TELEPHONE: command not found
./testprog: line 69: __LC_MEASUREMENT: command not found
./testprog: line 70: __LC_IDENTIFICATION: command not found
./testprog: line 74: extern: command not found
./testprog: line 76: struct: command not found
./testprog: line 80: char: command not found
./testprog: line 81: char: command not found
./testprog: line 87: char: command not found
./testprog: line 93: char: command not found
./testprog: line 94: char: command not found
./testprog: line 95: char: command not found
./testprog: line 96: char: command not found
./testprog: line 97: char: command not found
./testprog: line 98: char: command not found
./testprog: line 99: char: command not found
./testprog: line 100: char: command not found
./testprog: line 101: char: command not found
./testprog: line 103: char: command not found
./testprog: line 105: char: command not found
./testprog: line 107: char: command not found
./testprog: line 109: char: command not found
./testprog: line 116: char: command not found
./testprog: line 117: char: command not found
./testprog: line 120: char: command not found
./testprog: line 122: char: command not found
./testprog: line 124: char: command not found
./testprog: line 126: char: command not found
./testprog: line 133: char: command not found
./testprog: line 134: char: command not found
./testprog: line 142: syntax error near unexpected token `('
./testprog: line 142: `extern char *setlocale (int __category, const char *__locale) ;'
Und der Programmcode dafür ist:
Code:
#include<iostream>
int main(){
return 0;
}
Es sollte also eigentlich gar nichts kommen.
Für jeden Tip bin ich dankbar.