PDA

View Full Version : Componentes::qt_metacall(QMetaObject::Call, int, void**)':



Majestade
1st April 2007, 20:19
i got this error and i dont know what it means or how to resolve it!
************************************************** **************************************
moc_componentes.o: In function `Componentes::qt_metacall(QMetaObject::Call, int, void**)':
moc_componentes.cpp:(.text+0xee): undefined reference to `Componentes::abrirFicheiro()'
moc_componentes.cpp:(.text+0x110): undefined reference to `Componentes::escreveFicheiro(QString)'
moc_componentes.cpp:(.text+0x135): undefined reference to `Componentes::on_btGuardar_clicked()'
moc_componentes.cpp:(.text+0x142): undefined reference to `Componentes::on_btBackground_clicked()'
moc_componentes.cpp:(.text+0x14f): undefined reference to `Componentes::on_btSplash_clicked()'
moc_componentes.cpp:(.text+0x15f): undefined reference to `Componentes::on_btSilent_clicked()'
moc_componentes.cpp:(.text+0x16f): undefined reference to `Componentes::mostrarItems()'
moc_componentes.cpp:(.text+0x194): undefined reference to `Componentes::parseLinha(QString)'
moc_editorCL.o: In function `EditorCL::qt_metacall(QMetaObject::Call, int, void**)':
moc_editorCL.cpp:(.text+0x6b): undefined reference to `EditorCL::on_btAbrirComp_clicked()'
moc_editorCL.cpp:(.text+0x76): undefined reference to `EditorCL::on_btAbrirSis_clicked()'
moc_editorCL.cpp:(.text+0x86): undefined reference to `EditorCL::on_btNewComp_clicked()'
moc_editorCL.cpp:(.text+0x96): undefined reference to `EditorCL::on_btNewSis_clicked()'
moc_editorCL.cpp:(.text+0xa6): undefined reference to `EditorCL::on_btNewCL_clicked()'
collect2: ld returned 1 exit status
make: *** [matrioska] Error 1
************************************************** ************************************************** **
************************************************** ************************************************** **
thaks for the help!

wysota
1st April 2007, 20:50
Looks like your program didn't link correctly. Make sure your class code gets linked into the application. Do you use QMake?

Majestade
1st April 2007, 20:54
yes
i had only files .ui, .h and .cpp. Then, what i did was qmake -project, qmake and finaly make.
how can i see if what you say is happening?!

jacek
1st April 2007, 20:59
How and where did you implement for example EditorCL::on_btAbrirComp_clicked()?

Majestade
1st April 2007, 21:02
inside a folder called "editor" is where the editorCL.h is located. bur i opened the .pro file and the paths are all correct....all the folders have teh correct path!!!!

jacek
1st April 2007, 21:13
bur i opened the .pro file and the paths are all correct....
Does the SOURCES variable contain the file with EditorCL::on_btAbrirComp_clicked() implementation?

Could you post the first line of EditorCL::on_btAbrirComp_clicked() implementation?

wysota
1st April 2007, 21:34
Please also make sure the SOURCES variable in your .pro file doesn't contain any moc_*.cpp entries and that the HEADERS variable doesn't contain any ui_*.h entries.

Majestade
1st April 2007, 21:44
no...none of those entries are in those places!

jacek
1st April 2007, 21:50
no...none of those entries are in those places!
Does this mean that the files with those methods' implementations (i.e. EditorCL::on_btAbrirComp_clicked() et al.) aren't mentioned in the SOURCES variable? If they aren't add them and rerun qmake and make.