简体   繁体   中英

Compiling Plplot with support for Qt5

I'm looking at a free, LGPL library for 3D plotting with bindings for Qt5 . I've already covered my 2D plotting needs with QwtPlot but found no up-to-date alternative to the Qt Data Visualization (where the GPL license is a no go for my project) until I came across PlPlot which seems to fulfill all of my requirements.

However I have great difficulties in building the latest version (cloned the git repo) of the library on my 64bit Windows 10 with 32bit Qt 5.7 SDK . I have a working Qt installation (plus a build from source QwtPlot library which works like a charm).

In the PowerShell I did

cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE="Debug" -DENABLE_f95=OFF -DPL_DOUBLE=OFF -DPLPLOT_USE_QT5=ON -DDEFAULT_ALL_DEVICES=ON ..

from inside a build directory in the root of the directory tree of the local git repo.

The result is that I get the following error:

CMake Error at bindings/qt_gui/CMakeLists.txt:57 (target_link_libraries):
  The plain signature for target_link_libraries has already been used with
  the target "plplotqt".  All uses of target_link_libraries with a target
  must be either all-keyword or all-plain.

  The uses of the plain signature are here:

   * C:/Qt/5.7/mingw53_32/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:331 (target_link_libraries)

Here an advice is given to use an older version of cmake namely 3.3.2 . The problem is that 3.3.x as well as 3.2.x fail to install on Windows 10 with the error that PATH is too long . I don't know whether to laugh or cry when I see something like that. I'm not going to cut out chunks from my PATH just to install cmake even for a short period of time. This is rediculious. :-/ I also don't want to make any modifications on the cmake modules provided in the installation directory of my Qt .

Can anyone help me build the library for Qt5 ? If you have an alternative to PlPlot which fulfills my requirements (license and free of charge) I'm definitely willing to give it a shot.


EDIT: I've completely forgotten about the awesome VTK library (has BSD license). I'll go with it for now but would still like to know the solution for the problem I have written about.

EDIT: VTK builds and installs at least however the 3D plotting functionality seems to be undocumented (and probably pretty lacking).

It seems that I have misread the advice given in the mailing list. I had to completely remove the PUBLIC/PRIVATE variable from the CMakeLists.txt responsible for the Qt bindings of PlPlot. After I did that cmake successfully generated all the required make files and the build+install process afterwards was without any issues. I still have too find an example for integration with Qt (Qt5 preferably). It seems that both PlPlot and VTK have a lot in common in terms of poor Qt binding API documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM