mbasaglia / Qt-Color-Widgets

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

[Windows10] - Failed to extract plugin meta data from ..... #26

Open giladreich opened 7 years ago

giladreich commented 7 years ago

Failed to extract plugin meta data from 'C:\Qt\Qt5.8.0\5.8\msvc2015_64\plugins\designer\ColorWidgets-qt51.dll'

I'm trying to use this plugin, but getting this error when i go to Help -> About Plugins -> Failed Plugins The Widgets won't display in the designer. Note that I'm using Qt Version: 5.8. I build the plugin in release mode from the Qt Creator. Then i also tried building with cmake with a different bundle of Qt of MinGW32 with these commands:

mkdir build cd build cmake .. cmake-make cmake-make install And then confirmed that i have the dll in that path: C:\Qt\Qt5.8.0\5.8\msvc2015_64\plugins\designer\ColorWidgets-qt51.dll win fail

Is that has to do with compatibility issues with Windows? or I'm doing something wrong?

mbasaglia commented 7 years ago

Are you sure you are installing the right library? it should be called ColorWidgetsPlugin, while the one shown in the Qt Designer is just ColorWidgets (which is the library you should link to in the actual project).

giladreich commented 7 years ago

@mbasaglia Pretty positive, I downloaded the sourcecode -> opened with Qt Creator -> run qmake -> build all -> then the only thing i get is ColorWidgets-qt51.dll and libColorWidgets-qt51.a, i tried putting libColorWidgets-qt51.a in lib and dll in plugins. I tried building in release and debug mode and i don't see any ColorWidgetsPlugin.

Kicer86 commented 6 years ago

@mbasaglia @GiladRe looking at code I can see there is nothing about exporting symbols which is crucial when building under windows (for sure for visual studio, not sure about mingw, it may export everything by default). I think #23 and #17 suffer from the same thing.

mbasaglia commented 6 years ago

@Kicer86 https://github.com/mbasaglia/Qt-Color-Widgets/blob/master/include/colorwidgets_global.hpp

Kicer86 commented 6 years ago

@mbasaglia I cannot see usage in qt-designer plugin code

mbasaglia commented 6 years ago

Does it work if you add them to the plugin code?

Kicer86 commented 6 years ago

@mbasaglia don't know, I'm pure linux user, I just try to help :)

mbasaglia commented 6 years ago

shrugs I have no way to test it myself so it can't really be fixed until someone who has windows can test this.

Kicer86 commented 6 years ago

@mbasaglia you may try to build sources with -fvisibility=hidden and -fvisibility-inlines-hidden and adopt export macros you showed me to expand to attribute ((visibility ("default"))) for gcc. This should emulate windows situation. More details here.

kevin-ur commented 2 years ago

you can create custom widget from gui ,here is for your reference image