Skip to content
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

Build error on mac jkqtfastplotter.cpp:342:28: Variable has incomplete type 'QPainterPath' #45

Closed
abdedixit opened this issue Aug 14, 2020 · 5 comments

Comments

@abdedixit
Copy link

abdedixit commented Aug 14, 2020

Hi @jkriege2 ,

I am very eager to try this out, but I am facing the following build error while trying to build on macOS Catalina (v 10.15.5):

~/jkqtplotter/lib/jkqtmathtext/jkqtmathtext.cpp:40:18: error:
variable has incomplete type 'QPainterPath'
QPainterPath path;
^
In file included from ~/jkqtplotter/lib/jkqtmathtext/jkqtmathtext.cpp:22:
In file included from ~/jkqtplotter/lib/jkqtmathtext/jkqtmathtext.h:35:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/QPainter:1:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qpainter.h:48:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qpixmap.h:49:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qimage.h:48:
In file included from /usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qtransform.h:43:
/usr/local/Cellar/qt/5.15.0/lib/QtGui.framework/Headers/qmatrix.h:54:7: note:
forward declaration of 'QPainterPath'
class QPainterPath;

The workflow I followed:

  1. Installed qt using homebrew:
    % brew install qt5

  2. cmake .. -G "Xcode" "-DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt/5.15.0" (This step worked fine)

  3. cmake --build . --config "Debug" --> This step gave the above mentioned build error

Please let me know if there is any fix/workaround for this. Also let me know if you need more info from my side.

@jkriege2
Copy link
Owner

Ahhh ... there seem to be some incompatibilities, introduced with Qt 5.15 (i.e. we need to #include now explicitly at some places) ... I'm working on a fix und will let you know when it's available

@jkriege2
Copy link
Owner

If you want to experiment by hand, add #include to these files:
jkqtmathtext.cpp
jkqtfastplotter.cpp

... and anywhere else, where the compiler complains!

jkriege2 added a commit that referenced this issue Aug 14, 2020
- for Qt 5.15: added missing #include statements that became necessary since Qt 5.15
- for Qt 5.15: fixed use of several deprecated functions
- for Qt 5.15/6: removed usage of QMatrix
@jkriege2
Copy link
Owner

OK, this issue should be fixed via 7e9bad2

Could you confirm the fix?

@jkriege2 jkriege2 reopened this Aug 14, 2020
@abdedixit
Copy link
Author

Brilliant! This fix resolved the issue. Thanks!

The examples are really well made. I plan to use this tool in my audio signal processing research. Thanks again for the wonderful tool!

Best,
Abhi

@jkriege2
Copy link
Owner

You're welcome ... let me know if you have any more problems with the library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants