Ich arbeite auf einem Debian System und bin gerade dabei den Geany Editor zu testen.
Bis jetzt gefällt mir Geany auch ganz gut, aber irgend wie scheint Geany keine c++ Klassen.
Ich habe eine einfache Klasse geschrieben um Geany auszubrobieren, nichts was irgend wie Sinn macht.
Geany erkennt class, public, private und protected gar nicht als c++ Schlüsselwort sondern es wird als normaler Text interpretiert.
Unter Ecplipse lässt sich alles einwandfrei compilieren.
Geany sagt mir folgendes:
test.cpp:(.text+0x13): undefined reference to `cBla::cBla()'
test.cpp:(.text+0x5f): undefined reference to `cBla::setValue(int)'
test.cpp:(.text+0x6b): undefined reference to `cBla::getValue()'
test.cpp:(.text+0xae): undefined reference to `cBla::~cBla()'
hier noch ein bisschen Quellcode:
Hier befindet sich das Hauptprogramm:
Code: Alles auswählen
#include <iostream>
#include "ctest.h"
using namespace std;
int main(void)
{
int value;
cBla bla;
cout << "Bitte Wert eingeben" << endl;
cin >> value;
bla.setValue(value);
cout << "Der Wert ist: " << bla.getValue() << endl;
return 0;
}
Code: Alles auswählen
class cBla
{
private:
int value;
public:
void setValue(int value);
int getValue(void);
cBla(void);
~cBla(void);
};
Code: Alles auswählen
#include "ctest.h"
cBla::cBla(void)
{
}
cBla::~cBla(void)
{
}
void cBla::setValue(int value)
{
this->value = value;
}
int cBla::getValue(void)
{
return value;
}
Weiß jemand von euch wo der Hund begraben liegt.
Code: Alles auswählen