cd-console laesst sich nicht kompilieren
Hallo, wie in einem anderen Trhead angekuendigt die Frage, warum sich cd-console nicht kompilieren laesst. Hier die komplette Ausgabe des make-Laufs: gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX cd-console.cpp: In function 'int main(int, char**)': cd-console.cpp:418: error: 'strcmp' was not declared in this scope make[1]: *** [cd-console.o] Error 1 make[1]: Leaving directory `/tmp/cd-console-2.4' make: *** [all] Error 2 Und hier der entsprechende Abschnitt aus cd-console.cpp: int main(int argc, char** argv) { display_mode mode = SMALL; for (int i=1; i < argc; i++) { if (strcmp(argv[i], "--big") == 0) mode = BIG; else if ( (strcmp(argv[i], "-h") == 0) || (strcmp(argv[i], "--help") == 0) ) { print_help(); exit(0); } else if (strcmp(argv[i], "--version") == 0) { print_version(); exit(0); } else { printf("Unknown option '%s'.\n", argv[i]); exit(1); } } cd_console cd_cons(mode); cd_cons.run(); return 0; }; Kann es mit der verwendeten gcc- oder make-Version zusammenhaengen? Installiert sind gcc-4.0.2_20050901-3 und make-3.80-188. Beste Gruesse, Heinz. -- ******************************************************************** "Erlebnis Bulgarien. Ein Reisefuehrer" Von Heinz W. Pahlke Mehr unter http://www.erlebnis-bulgarien.de ********************************************************************
Hallo, Am Thu, 20 Apr 2006, Heinz W. Pahlke schrieb:
wie in einem anderen Trhead angekuendigt die Frage, warum sich cd-console nicht kompilieren laesst.
Hier die komplette Ausgabe des make-Laufs:
gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX cd-console.cpp: In function 'int main(int, char**)': cd-console.cpp:418: error: 'strcmp' was not declared in this scope
Da fehlt ein #include <cstring> Aber warum nimmst du nicht einfach die SUSE-RPMs? Auch xmcd habe ich als SUSE-RPM. -dnh --
mangelnde Durchblutung des Gehirns solltet ihr Jungs doch gewohnt sein, oder nicht? -- Steffi Abel und Pah, ihr seid doch nur stolz, daß bei Euch alles unter Putz ist, während bei uns die Kabel lose baumeln ... -- Michael Fesser in darw
Hallo, On 20-Apr-2006 David Haller wrote:
Hier die komplette Ausgabe des make-Laufs:
gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX cd-console.cpp: In function 'int main(int, char**)': cd-console.cpp:418: error: 'strcmp' was not declared in this scope
Da fehlt ein
#include <cstring>
Okay, eingefuegt, und: -----------------------------------8<------------------------------ gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX gcc -c cd.cpp -O2 -Wall -DOS_LINUX gcc -c cd_ll_linux.cpp -O2 -Wall -DOS_LINUX gcc cd-console.o cd.o cd_ll_linux.o -lncurses -o cd-console -O2 -Wall -DOS_LINUX cd-console.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' cd.o: In function `cd::cd()': cd.cpp:(.text+0x645): undefined reference to `operator new(unsigned int)' cd.cpp:(.text+0x684): undefined reference to `operator delete(void*)' cd.o: In function `cd::cd()': cd.cpp:(.text+0x705): undefined reference to `operator new(unsigned int)' cd.cpp:(.text+0x744): undefined reference to `operator delete(void*)' cd.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' cd_ll_linux.o: In function `cd_ll_linux::~cd_ll_linux()': cd_ll_linux.cpp:(.text+0x97): undefined reference to `operator delete(void*)' cd_ll_linux.o:(.gnu.linkonce.r._ZTI11cd_ll_linux[typeinfo for cd_ll_linux]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' cd_ll_linux.o:(.gnu.linkonce.r._ZTI5cd_ll[typeinfo for cd_ll]+0x0): undefined re ference to `vtable for __cxxabiv1::__class_type_info' cd_ll_linux.o:(.gnu.linkonce.r._ZTV5cd_ll[vtable for cd_ll]+0x10): undefined ref erence to `__cxa_pure_virtual' cd_ll_linux.o:(.gnu.linkonce.r._ZTV5cd_ll[vtable for cd_ll]+0x14): undefined ref erence to `__cxa_pure_virtual' cd_ll_linux.o:(.gnu.linkonce.r._ZTV5cd_ll[vtable for cd_ll]+0x18): undefined ref erence to `__cxa_pure_virtual' cd_ll_linux.o:(.gnu.linkonce.r._ZTV5cd_ll[vtable for cd_ll]+0x1c): undefined ref erence to `__cxa_pure_virtual' cd_ll_linux.o:(.gnu.linkonce.r._ZTV5cd_ll[vtable for cd_ll]+0x20): undefined ref erence to `__cxa_pure_virtual' cd_ll_linux.o:(.gnu.linkonce.r._ZTV5cd_ll[vtable for cd_ll]+0x24): more undefine d references to `__cxa_pure_virtual' follow cd_ll_linux.o: In function `cd_ll::~cd_ll()': cd_ll_linux.cpp:(.gnu.linkonce.t._ZN5cd_llD0Ev[cd_ll::~cd_ll()]+0xe): undefined reference to `operator delete(void*)' cd_ll_linux.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status make[1]: *** [cd-console] Error 1 make[1]: Leaving directory `/tmp/cd-console-2.4' make: *** [all] Error 2 --------------------------------8<-----------------------------------
Aber warum nimmst du nicht einfach die SUSE-RPMs? Auch xmcd habe ich als SUSE-RPM.
Die 10.0 kommt ohne beide Programme. Auf der 9.0 war cd-console ebenfalls nicht, xmcd dagegen immerhin in der Version 3.0.2. Aktuell ist allerdings die 3.3.2. Beste Gruesse, Heinz. -- ******************************************************************** "Erlebnis Bulgarien. Ein Reisefuehrer" Von Heinz W. Pahlke Mehr unter http://www.erlebnis-bulgarien.de ********************************************************************
On Thu, Apr 20, 2006 at 09:44:29PM +0200, Heinz W. Pahlke wrote:
Hallo,
On 20-Apr-2006 David Haller wrote:
Hier die komplette Ausgabe des make-Laufs:
gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX cd-console.cpp: In function 'int main(int, char**)': cd-console.cpp:418: error: 'strcmp' was not declared in this scope
Da fehlt ein
#include <cstring>
Okay, eingefuegt, und:
gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX
Einfach "g++" statt "gcc" fuer C++ Programme nehmen. Ciao, Marcus
Hallo, Am Thu, 20 Apr 2006, Heinz W. Pahlke schrieb:
Hier die komplette Ausgabe des make-Laufs:
gcc -c cd-console.cpp -O2 -Wall -DOS_LINUX cd-console.cpp: In function 'int main(int, char**)': cd-console.cpp:418: error: 'strcmp' was not declared in this scope make[1]: *** [cd-console.o] Error 1 make[1]: Leaving directory `/tmp/cd-console-2.4' make: *** [all] Error 2 [..] Kann es mit der verwendeten gcc- oder make-Version zusammenhaengen? Installiert sind gcc-4.0.2_20050901-3 und make-3.80-188.
So sollte auch bei dir klappen: $ make CC="g++ -include string.h" clean all -dnh --
Womit erstellt ihr so eure Homepages? mit vim *g*. Wobei es Leute gibt, die tatsächlich behaupten, das soll auch mit diesem Betriebssystem - wie heißt es doch gleich - *äh* Emacs gehen. [> Bernd Stäglich und Philipp Zacharias in suse-linux]
Hallo, On 20-Apr-2006 David Haller wrote:
So sollte auch bei dir klappen:
$ make CC="g++ -include string.h" clean all
^^^^^^^ Das war's es. Damit habe ich nun auch endlich _das_ Programm, das ich mir wuensche. Einen schoenen Abend, Heinz. -- ******************************************************************** "Erlebnis Bulgarien. Ein Reisefuehrer" Von Heinz W. Pahlke Mehr unter http://www.erlebnis-bulgarien.de ********************************************************************
participants (3)
-
David Haller
-
Heinz W. Pahlke
-
Marcus Meissner