0

I'm updating a code from Qt3 to Qt4. I used qt3to4 porting tool, and it fixed some of my issues. But a few errors are remaining:

g++ -m64 -Wl,-O1 -o CONVECTION_DYN_CODE_version_initiale Convection_points.o Convection_points_prof.o glbox.o globjwin.o main.o algebra.o evector.o matrix.o matrix4.o quaternion.o write_binary.o write_binary_normals.o moc_glbox.o moc_globjwin.o   -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lQtOpenGL -lQtGui -lQtCore -lGLU -lglut -lGL -lpthread -lCGAL -fp-model -lboost_thread -lgmp
glbox.o:(.rodata._ZTI7Q3GList[typeinfo for Q3GList]+0x10): undefined reference to `typeinfo for Q3PtrCollection'

&

glbox.o:(.rodata._ZTV7Q3GList[vtable for Q3GList]+0x18): undefined reference to `Q3GList::clear()'
glbox.o:(.rodata._ZTV7Q3GList[vtable for Q3GList]+0x20): undefined reference to `Q3GList::~Q3GList()'
glbox.o:(.rodata._ZTV7Q3GList[vtable for Q3GList]+0x28): undefined reference to `Q3GList::~Q3GList()'
glbox.o:(.rodata._ZTV7Q3GList[vtable for Q3GList]+0x30): undefined reference to `Q3PtrCollection::newItem(void*)'
...

Both Q3GList and Q3PtrCollection are internal classes. I added the corresponding headers but I still got these errors. I don't know how to fix it since it seems to be internal issues.

Any ideas?

Mysticial
  • 464,885
  • 45
  • 335
  • 332
Kamouth
  • 134
  • 2
  • 9
  • You should reimplement code parts that depend on Qt3. Qt3Support module will be abandoned. What kept your app to use Qt3 for 7 years after Qt 4 release? – Kamil Klimek Sep 21 '12 at 22:48
  • Actually I wanted to avoid re-implementing these parts of the code. But it doesn't seem to be an option. I'm updating some code to add some tools to it. Thank you for your answer. – Kamouth Sep 24 '12 at 07:27

1 Answers1

1

You should also link against qt3support module.

Add

QT += qt3support

to your project settings.

Lol4t0
  • 12,444
  • 4
  • 29
  • 65
  • Thank you for your answer. I tried to "link against" qt3support module but it doesn't seems to work. – Kamouth Sep 24 '12 at 07:24
  • @Kamouth, did `-lqt3support` add to your link command? (that is first line in your post) – Lol4t0 Sep 24 '12 at 15:51
  • I added QT += qt3support (not -lqt3support) and modified a bit my .pro and it works (I haven't understood well what was wrong with my .pro). Thank you for helping some random newbie like me :) – Kamouth Sep 25 '12 at 14:06