-
Notifications
You must be signed in to change notification settings - Fork 805
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
Q_NAMESPACE error when trying to build #338
Comments
Would be not bad to tell what Qt version you are using |
Qt's docs say that |
I am running on Windows and using Qt 5.9.7 and MSVC 19.34.31935.0 (Visual Studio 17 2022). I also tried with MinGW CXX compiler as GNU 6.3.0, and got the same error. From a quick search for the docs you mention, it looks like Q_NAMESPACE_EXPORT wasn't introduced until Qt 5.14, so that could be my issue. I tried putting Q_NAMESPACE right after the namespace definition, and it threw a bunch more errors, so I'll try installing a newer version of Qt to see if it resolves it! |
Oh, I did not notice that. Sorry, I was initially developing just on 6.x and just lately fixed all inconsistencies to compile on the latest 5.15.xx I think 5.15 is the only and the last supported version from the 5.x release, it makes sense to update your installation. |
Hi, I got same error, and my env is: Ubuntu 20.04, Qt Ver: 5.12. |
The continuous integration service on https://www.appveyor.com/ builds this project with MSVS and Qt 5.15 |
@soccerdude008 did you manage to fix the issue? |
@paceholder Sorry I haven't had a chance to try downloading Qt 5.15 yet, but totally expect it will work in that case, so feel free to close out the issue. I guess the only thing you might change in the repo is in the README.rst it lists Qt > 5.2 as a dependency, so maybe update that to Qt >= 5.15? |
I updated Readme |
It is definitely worth allowing this project to compile on less than Qt 5.15 because Ubuntu 20.04 LTS uses Qt 5.12.8. Forcing users to upgrade to the latest version of Ubuntu or recompiling Qt or using a PPA repository with backported updates is painful to say the least. What's furthermore is that nodeeditor won't build at all on Ubuntu 18.04 LTS because of line 3 in
This occurs because the CMake version that 18.04 supplies is older than the policy. Alas, CMake can be built from source and it will work again so long as I use this project as a submodule and a CMake pipeline, and it is trivial to fix the problem (at least using the project as a shared libary) by replacing line 16 as follows:
Can we perhaps wrap this in an |
Looks like I spoke too soon - I see a commit has already fixed this. My reasoning still stands which makes me happy to see you are taking care of the backward compatibility so thank you! |
When I try to build this on Windows with msvc I get the following error:
nodeeditor/include/QtNodes/internal/Definitions.hpp(14): Error: Namespace declaration lacks Q_NAMESPACE macro.
Any clue how to fix that error?
The text was updated successfully, but these errors were encountered: