mbasaglia / Qt-Color-Widgets

Color wheel widget and dialog for Qt
147 stars 54 forks source link

Trouble with designer plugin build on Ubuntu 12.04 Qt version 4.8.1 #10

Closed ab3nd closed 7 years ago

ab3nd commented 10 years ago

Making everything else works fine.

When I try to build the designer plugin, first I get a warning from qmake but a makefile still gets created. Running make gets a compilation failure.

me@myhost:~/Projects/Qt-Color-Picker$ cd designer_plugin/ me@myhost:~/Projects/Qt-Color-Picker/designer_plugin$ qmake Project MESSAGE: Warning: unknown QT: designer me@myhost:~/Projects/Qt-Color-Picker/designer_plugin$ make g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_WEBKIT -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../src -I../include -I../out/generated -I../out/generated -o ../out/obj/color_preview_plugin.o color_preview_plugin.cpp In file included from color_preview_plugin.cpp:25:0: color_preview_plugin.hpp:28:42: fatal error: QDesignerCustomWidgetInterface: No such file or directory compilation terminated. make: *\ [../out/obj/color_preview_plugin.o] Error 1

By changing the file color_widget_plugin.pro to include the line:

CONFIG += designer plugin

I can get as far as this: me@myhost:~/Projects/Qt-Color-Picker/designer_plugin$ make g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I../src -I../include -I../out/generated -I../out/generated -o ../out/obj/color_preview_plugin.o color_preview_plugin.cpp g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I../src -I../include -I../out/generated -I../out/generated -o ../out/obj/color_wheel_plugin.o color_wheel_plugin.cpp g++ -c -pipe -O2 -D_REENTRANT -Wall -W -fPIC -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I../src -I../include -I../out/generated -I../out/generated -o ../out/obj/color_widget_plugin_collection.o color_widget_plugin_collection.cpp In file included from color_widget_plugin_collection.cpp:25:0: color_widget_plugin_collection.hpp:33:23: error: ‘IID’ has not been declared color_widget_plugin_collection.hpp:33:27: error: expected ‘,’ or ‘...’ before string constant color_widget_plugin_collection.hpp:33:65: error: ISO C++ forbids declaration of ‘Q_PLUGIN_METADATA’ with no type [-fpermissive] color_widget_plugin_collection.hpp:33:65: error: expected ‘;’ at end of member declaration make: *\ [../out/obj/color_widget_plugin_collection.o] Error 1

mbasaglia commented 10 years ago

I've added some code for Qt 4 and now it should compile fine. ( I've tested it with 4.8.6 ) I didn't have the time to see if it works in designer though.

mbasaglia commented 7 years ago

This is very old so I'll close it.