digitalmars.D.learn - Linking errors to Newton headers
- Anders Johnsen (15/15) Oct 03 2007 Hey,
- Anders Johnsen (2/25) Oct 03 2007
- Jarrett Billingsley (5/19) Oct 03 2007 Looks like Newton's written in C++. Does it have a C interface? Becaus...
- Anders Johnsen (2/26) Oct 03 2007
- Bill Baxter (6/8) Oct 03 2007 Yes it's definitely C. Htod is really not very smart. It may have
- Carlos Santander (4/27) Oct 03 2007 Try linking with stdc++ (-llstdc++ ?)
Hey, I'm playing around with a bit of OpenGL in D, and decided to add some physics. I choose Newton, but I'm having a few problems linking it. When i compile i use: dsss build -llNewton It finds the file alright, but i get a TON of error like: /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile.o):(.gnu.linkonce.r. ZTI6dgFile[typeinfo for dgFile]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile. ):(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTI17dgConv xCollision[typeinfo for dgConvexCollision]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x28): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x54): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision. ):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' I've kind a lost my head in this. Maybe it's just a small thing that i've forgotten, but i'm not sure what... Hope someone got an idea. Thanks, Anders johnsen
Oct 03 2007
Ohh yeah, forgot to say. I build the Newton.d file with htod from the Newton.h file. Anders Johnsen Wrote:Hey, I'm playing around with a bit of OpenGL in D, and decided to add some physics. I choose Newton, but I'm having a few problems linking it. When i compile i use: dsss build -llNewton It finds the file alright, but i get a TON of error like: /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile.o):(.gnu.linkonce.r. ZTI6dgFile[typeinfo for dgFile]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile. ):(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTI17dgConv xCollision[typeinfo for dgConvexCollision]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x28): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x54): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision. ):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' I've kind a lost my head in this. Maybe it's just a small thing that i've forgotten, but i'm not sure what... Hope someone got an idea. Thanks, Anders johnsen
Oct 03 2007
"Anders Johnsen" <skabet gmail.com> wrote in message news:fe03f2$rol$1 digitalmars.com.../usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile.o):(.gnu.linkonce.r. ZTI6dgFile[typeinfo for dgFile]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile. ):(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTI17dgConv xCollision[typeinfo for dgConvexCollision]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x28): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x54): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision. ):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'Looks like Newton's written in C++. Does it have a C interface? Because if it uses a C++ interface, you're going to have to use BCD.gen, if anything, to bind to it.
Oct 03 2007
I'm pretty sure it's C interface. At least it doesn't have any classes in the header(only structs). Jarrett Billingsley Wrote:"Anders Johnsen" <skabet gmail.com> wrote in message news:fe03f2$rol$1 digitalmars.com.../usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile.o):(.gnu.linkonce.r. ZTI6dgFile[typeinfo for dgFile]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile. ):(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTI17dgConv xCollision[typeinfo for dgConvexCollision]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x28): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x54): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision. ):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'Looks like Newton's written in C++. Does it have a C interface? Because if it uses a C++ interface, you're going to have to use BCD.gen, if anything, to bind to it.
Oct 03 2007
Anders Johnsen wrote:I'm pretty sure it's C interface. At least it doesn't have any classes in the header(only structs).Yes it's definitely C. Htod is really not very smart. It may have botched the translation. I have Newton installed -- what was the command line you used for htod? Straight up "htod Newton.h" just gave me errors. --bb
Oct 03 2007
Anders Johnsen escribió:Hey, I'm playing around with a bit of OpenGL in D, and decided to add some physics. I choose Newton, but I'm having a few problems linking it. When i compile i use: dsss build -llNewton It finds the file alright, but i get a TON of error like: /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile.o):(.gnu.linkonce.r. ZTI6dgFile[typeinfo for dgFile]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgFile. ):(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTI17dgConv xCollision[typeinfo for dgConvexCollision]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x28): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision.o):(.gnu.linkonce.r._ZTV17dgCo vexCollision[vtable for dgConvexCollision]+0x54): undefined reference to `__cxa_pure_virtual' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libNewton.a(dgConvexCollision. ):(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' I've kind a lost my head in this. Maybe it's just a small thing that i've forgotten, but i'm not sure what... Hope someone got an idea. Thanks, Anders johnsenTry linking with stdc++ (-llstdc++ ?) -- Carlos Santander Bernal
Oct 03 2007