wxf04125
2nd June 2013, 18:55
Hi, i've got an error when i compile a qt project which produce a qt application binary file.
In the project i use a qt lib of mine which has following code:
QPalette palette;
palette.setColor(QPalette::Background, QColor(60,60,60));
palette.setColor(QPalette::Foreground, QColor(255,255,0));
Mess.setPalette(palette);
It's ok when i compile the qt lib,but after that, when i compile the qt project which links the qt lib, the following error messages show up:
libQt5Widgets.so: undefined reference to symbol 'QPalette::QPalette()'
/usr/bin/ld: note: 'QPalette::QPalette()' is defined in DSO libQt5Gui.so so try adding it to the linker command line
libQt5Gui.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
i don't know why bcoz libQt5Widgets, libQt5Gui and other necessary libs are all there.
so , just help me.
In the project i use a qt lib of mine which has following code:
QPalette palette;
palette.setColor(QPalette::Background, QColor(60,60,60));
palette.setColor(QPalette::Foreground, QColor(255,255,0));
Mess.setPalette(palette);
It's ok when i compile the qt lib,but after that, when i compile the qt project which links the qt lib, the following error messages show up:
libQt5Widgets.so: undefined reference to symbol 'QPalette::QPalette()'
/usr/bin/ld: note: 'QPalette::QPalette()' is defined in DSO libQt5Gui.so so try adding it to the linker command line
libQt5Gui.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
i don't know why bcoz libQt5Widgets, libQt5Gui and other necessary libs are all there.
so , just help me.