NetBeans für C++

L

Lightstorm

Foren As
Ich habe mir Netbeans für C++ unter Windows eingerichtet, alles funktioniert.
Und jetzt habe ich es auch für Ubuntu 9.04 versucht, aber ich habe ein Problem.

Als Code habe ich zum testen ein einfaches Hallo Welt:
Code:
#include <iostream>

using namespace std;

int main ()
{
    cout << "Hallo Welt" << endl;
    return 0;
}

Beim kompilieren kommt dieser Log mit Fehlermeldung:
"/usr/bin/make -f Makefile CONF=Debug" läuft in /home/lightstorm/NetBeansProjects/Application_1

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Betrete Verzeichnis '/home/lightstorm/NetBeansProjects/Application_1'
/usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/application_1
make[2]: Betrete Verzeichnis '/home/lightstorm/NetBeansProjects/Application_1'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/neufile.o.d
cpp-4.3 -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/neufile.o.d -o build/Debug/GNU-Linux-x86/neufile.o neufile.cpp
cpp-4.3: »-c« ist keine gültige Präprozessoroption
make[2]: *** [build/Debug/GNU-Linux-x86/neufile.o] Fehler 1
make[2]: Verlasse Verzeichnis '/home/lightstorm/NetBeansProjects/Application_1'
make[1]: *** [.build-conf] Fehler 2
make[1]: Verlasse Verzeichnis '/home/lightstorm/NetBeansProjects/Application_1'
make: *** [.build-impl] Fehler 2

Erstellen - fehlgeschlagen. Endwert 2.



Hier ein paar Informationen:
lightstorm@lightstorm-desktop:~$ gcc --version

gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.

lightstorm@lightstorm-desktop:~$ g++ --version

g++ (Ubuntu 4.3.3-5ubuntu4) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.

lightstorm@lightstorm-desktop:~$ make --version

GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
Dieses Programm wurde erstellt für i486-pc-linux-gnu

lightstorm@lightstorm-desktop:~$ gdb --version

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
This GDB was configured as "i486-linux-gnu".


Die Einstellungen in Netbeans:
http://img34.imageshack.us/img34/9386/screeeenk.jpg
 
Zuletzt bearbeitet:
Code:
cpp-4.3 -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/neufile.o.d -o build/Debug/GNU-Linux-x86/neufile.o neufile.cpp
cpp-4.3: »-c« ist keine gültige Präprozessoroption
Also bei mir wird hier (wirklich) g++ aufgerufen...
Code:
/usr/bin/gmake -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
gmake[1]: Entering directory `/home/krj/NetBeansProjects/Application_1'
/usr/bin/gmake  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/application_1
gmake[2]: Entering directory `/home/krj/NetBeansProjects/Application_1'
mkdir -p build/Debug/GNU-Linux-x86
rm -f build/Debug/GNU-Linux-x86/main.o.d
g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/main.o.d -o build/Debug/GNU-Linux-x86/main.o main.cpp
mkdir -p dist/Debug/GNU-Linux-x86
g++     -o dist/Debug/GNU-Linux-x86/application_1 build/Debug/GNU-Linux-x86/main.o  
gmake[2]: Leaving directory `/home/krj/NetBeansProjects/Application_1'
gmake[1]: Leaving directory `/home/krj/NetBeansProjects/Application_1'

Build successful. Exit value 0.
Die Einstellungen in Netbeans:
[...]
Bis auf das Make Kommando (bei mir gmake) sind meine Einstellungen hier gleich.

Was steht in den Projekt Einstellungen ? Die Sektion Build wäre von Interesse...
Anbei ein paar Einstellungen von mir:

Build (General)
Tool Collection -> GNU
C++ Compiler Required -> angehakt

Build -> C++ Compiler
Tool -> g++

Build -> Linker
Tool -> g++
 
Du hast Recht, irgendwas stimmte mit der Projektdatei nicht, ich hatte es erstellt wo die Einstellungen noch nicht korrekt waren.

Habe es jetzt einfach gelöscht und eine neue gemacht und es läuft Fehlerfrei :)

So schnell kanns gehen, ich benutze NetBeans zum ersten mal und wusste nicht mal von den Eigenschaften einer Projektdatei.
Danke aufjedenfall.
 

Ähnliche Themen

Verständnisfrage zu RegExps

Fehler beim Kompilieren von qcserial

rsync: Problem - Verzeichnisse mit Suffix umbenennen - nach 2.6.9

Falsche Rechte gesetzt beim Anlegen von Ordnern via Samba-Client

rsnapshot und ein Rechteproblem?

Zurück
Oben