daemon777
Lt. Commander
- Dabei seit
- Dez. 2003
- Beiträge
- 1.371
Ich habe mal wieder ein Problem.
Und zwar habe ich ein kleines Programm gebastelt welches 1. nicht besonders groß ist und 2. auch funktioniert hat. Allerdings hat da noch alles in einer Datei gestanden. Ich habe einfach nicht erwartet, dass ich noch so viel an diesem Programm rumbasteln werde.
Jedenfalls habe ich mir dann die Arbeit gemacht, dass in mehrere Dateien aufzuspalten. Schön und gut. Allerdings habe ich jetzt eine Fehlermeldung. Dabei habe ich doch eigentlich nichts am Code geändert.
------ Build started: Project: test2, Configuration: Debug Win32 ------
Linking...
laden.obj : error LNK2005: "public: __thiscall CFunctions::CFunctions(void)" (??0CFunctions@@QAE@XZ) already defined in functions.obj
laden.obj : error LNK2005: "public: __thiscall CFunctions::~CFunctions(void)" (??1CFunctions@@QAE@XZ) already defined in functions.obj
laden.obj : error LNK2005: "public: int __thiscall CFunctions::strToint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?strToint@CFunctions@@QAEHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in functions.obj
main.obj : error LNK2005: "public: __thiscall CFunctions::CFunctions(void)" (??0CFunctions@@QAE@XZ) already defined in functions.obj
main.obj : error LNK2005: "public: __thiscall CFunctions::~CFunctions(void)" (??1CFunctions@@QAE@XZ) already defined in functions.obj
main.obj : error LNK2005: "public: int __thiscall CFunctions::strToint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?strToint@CFunctions@@QAEHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in functions.obj
main.obj : error LNK2005: "public: __thiscall CLaden::CLaden(void)" (??0CLaden@@QAE@XZ) already defined in laden.obj
main.obj : error LNK2005: "public: int __thiscall CLaden::readdat(char *)" (?readdat@CLaden@@QAEHPAD@Z) already defined in laden.obj
D:\PFADZUMPROJEKT\test2.exe : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://d:\PFADZUMPROJEKT\test\test2\test2\Debug\BuildLog.htm"
test2 - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Der Quellcode besteht eigentlich nur aus 2 Klassen, die in 2 verschiedenen Dateien liegen und einer main-Datei, die Funktionen dieser Klassen aufruft. Richtig included ist denke ich auch alles, denn ansonsten würde ich ja eine andere Fehlermeldung bekommen.
Könnt ihr mir mal wieder helfen ?
danke schon mal
Und zwar habe ich ein kleines Programm gebastelt welches 1. nicht besonders groß ist und 2. auch funktioniert hat. Allerdings hat da noch alles in einer Datei gestanden. Ich habe einfach nicht erwartet, dass ich noch so viel an diesem Programm rumbasteln werde.
Jedenfalls habe ich mir dann die Arbeit gemacht, dass in mehrere Dateien aufzuspalten. Schön und gut. Allerdings habe ich jetzt eine Fehlermeldung. Dabei habe ich doch eigentlich nichts am Code geändert.
------ Build started: Project: test2, Configuration: Debug Win32 ------
Linking...
laden.obj : error LNK2005: "public: __thiscall CFunctions::CFunctions(void)" (??0CFunctions@@QAE@XZ) already defined in functions.obj
laden.obj : error LNK2005: "public: __thiscall CFunctions::~CFunctions(void)" (??1CFunctions@@QAE@XZ) already defined in functions.obj
laden.obj : error LNK2005: "public: int __thiscall CFunctions::strToint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?strToint@CFunctions@@QAEHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in functions.obj
main.obj : error LNK2005: "public: __thiscall CFunctions::CFunctions(void)" (??0CFunctions@@QAE@XZ) already defined in functions.obj
main.obj : error LNK2005: "public: __thiscall CFunctions::~CFunctions(void)" (??1CFunctions@@QAE@XZ) already defined in functions.obj
main.obj : error LNK2005: "public: int __thiscall CFunctions::strToint(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?strToint@CFunctions@@QAEHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) already defined in functions.obj
main.obj : error LNK2005: "public: __thiscall CLaden::CLaden(void)" (??0CLaden@@QAE@XZ) already defined in laden.obj
main.obj : error LNK2005: "public: int __thiscall CLaden::readdat(char *)" (?readdat@CLaden@@QAEHPAD@Z) already defined in laden.obj
D:\PFADZUMPROJEKT\test2.exe : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://d:\PFADZUMPROJEKT\test\test2\test2\Debug\BuildLog.htm"
test2 - 9 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Der Quellcode besteht eigentlich nur aus 2 Klassen, die in 2 verschiedenen Dateien liegen und einer main-Datei, die Funktionen dieser Klassen aufruft. Richtig included ist denke ich auch alles, denn ansonsten würde ich ja eine andere Fehlermeldung bekommen.
Könnt ihr mir mal wieder helfen ?
danke schon mal
