-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows support? #17
Comments
To be honest I don't know what windows needs to expose symbols for dynamic linkage and I have no way of testing this, I'd guess CMake would need to generate the defines used in https://github.com/mbasaglia/Qt-Color-Widgets/blob/master/include/colorwidgets_global.hpp at the proper time. |
Anyone got it to compile on WIndows ? |
Yep, just today :D But... I have compiled it under MSYS2 using qt5 (5.6) static toolchain. I had to add this define to my build settings:
In the end it worked. I haven't tried building a dll. |
Sorry for the comment I was really in a rush and I managed to compile my application under Windows. I just had to compile the lib, put the .dll in |
@maximeborges , Could you please tell how did you compile the project ? The widgets doesn't show on my designer and i have the exact same version of mingw53 as yours. I tried with CMake and Qt Creator to compile and it fails to load the plugin. |
I used CMake if I remember correctly, but I didn't remember more than that sorry |
@maximeborges, hello! One year ago you asked if someone managed to compile this library under Windows. I answer you: yes, I did! Back in 2015 I have used qmake project that comes with the library, but now I have made some changes in #37, so now it is possible to properly compile the library under Windows. However, there are a lot of changed in project structure. |
I was wondering if you could do something about Windows support.
I have installed Qt 5, Qt Static, MinGW and CMake on Windows 10. The following happens when I try to compile for Windows:
CMake had to be set to
cmake .. -G "MinGW Makefiles" and
set(CMAKE_PREFIX_PATH "C:\Qt\Qt5.5.1\5.5\mingw492_32"`. MinGW and CMake both have been added to PATH.PS C:\Users\User\Qt-Color-Widgets\build> mingw32-make -j5 [ 1%] Generating ui_color_palette_widget.h [ 3%] Generating qrc_color_widgets.cpp [ 5%] Generating include/moc_color_palette_model.cpp [ 6%] Generating include/moc_color_palette_widget.cpp [ 8%] Generating include/moc_colorwidgets_global.cpp C:/Users/User/Qt-Color-Widgets/include/colorwidgets_global.hpp:0: Note: No relevant classes found. No output generated. [ 10%] Generating include/moc_color_wheel.cpp [ 11%] Generating include/moc_color_line_edit.cpp [ 13%] Generating include/moc_swatch.cpp [ 15%] Generating include/moc_color_delegate.cpp [ 16%] Generating include/moc_color_palette.cpp [ 18%] Generating include/moc_hue_slider.cpp [ 20%] Generating include/moc_abstract_widget_list.cpp [ 22%] Generating include/moc_bound_color_selector.cpp [ 23%] Generating include/moc_color_dialog.cpp [ 25%] Generating include/moc_color_2d_slider.cpp [ 27%] Generating include/moc_color_selector.cpp [ 28%] Generating include/moc_color_list_widget.cpp [ 30%] Generating include/moc_color_preview.cpp [ 32%] Generating include/moc_gradient_slider.cpp [ 33%] Generating include/moc_color_names.cpp C:/Users/User/Qt-Color-Widgets/include/color_names.hpp:0: Note: No relevant classes found. No output generated. [ 35%] Generating ui_color_dialog.h Scanning dependencies of target ColorWidgets-qt5 [ 37%] Building CXX object CMakeFiles/ColorWidgets-qt5.dir/src/color_list_widget.cpp.obj C:\Users\User\Qt-Color-Widgets\src\color_list_widget.cpp:35:1: warning: 'color_widgets::ColorListWidget::ColorListWidget(QWidget*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] C:\Users\User\Qt-Color-Widgets\src\color_list_widget.cpp:43:1: warning: 'virtual color_widgets::ColorListWidget::~ColorListWidget()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] C:\Users\User\Qt-Color-Widgets\src\color_list_widget.cpp:48:15: warning: 'QList<QColor> color_widgets::ColorListWidget::colors() const' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] C:\Users\User\Qt-Color-Widgets\src\color_list_widget.cpp:53:6: warning: 'void color_widgets::ColorListWidget::setColors(const QList<QColor>&)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] C:\Users\User\Qt-Color-Widgets\src\color_list_widget.cpp:62:6: warning: 'virtual void color_widgets::ColorListWidget::swap(int, int)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
There is far more to this message, and it eventually builds, but then doesn't produce a .dll file. I would tell everyone to use Linux but not everyone will listen. :(
The text was updated successfully, but these errors were encountered: