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

"fatal error: definition of type 'QStringList' conflicts with type alias of the same name" when building on macOS #71

Open
msdf2244 opened this issue Sep 23, 2021 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@msdf2244
Copy link

I'm building on MacOS Big Sur version 11.4. I get the following error when running
cmake --build build --target nvui --config Release
found in the macOS build instructions:
Screen Shot 2021-09-22 at 11 35 22 PM

@rohit-px2
Copy link
Owner

It looks like you have Qt installed in two places and they are conflicting with each other. I think /usr/local/include is the default directory for header files on Mac, which makes this difficult since it will automatically include those header files.
If you could delete the Qt header files in /usr/local/include the build might succeed, but that's obviously not a great solution.
I don't know how to solve this issue in a good way right now. If anyone with more Mac experience knows a way, please let me know.

@rohit-px2 rohit-px2 assigned rohit-px2 and unassigned rohit-px2 Sep 23, 2021
@rohit-px2 rohit-px2 added the help wanted Extra attention is needed label Sep 23, 2021
@msdf2244
Copy link
Author

You were correct. I had qt 6 installed as a dependency for something else. I ended up removing it. Thanks for the help.

@adaszko
Copy link

adaszko commented Sep 28, 2021

Hi 👋 Could we please keep this issue open? I'm experiencing the same exact compilation error but can't remove Qt6 because other installed software depends on it. There must be a way to configure the build environment so that it uses the Qt version it's told to use and not an automatically detected one.

@rohit-px2 rohit-px2 reopened this Sep 28, 2021
@rohit-px2
Copy link
Owner

Sure, unfortunately I don't know how to fix this since I've never really dealt with Linux/macOS and shared libs much.

@ipatch
Copy link

ipatch commented Jul 9, 2022

came here from the following web search

qcoreapplication.h error: definition of type 'QStringList' conflicts with type alias of the same name

this appeared on the first page of my search results 🕷🕸

i'm no expert so forgive me if i stepping out of bounds here.

i came across this issue today as well, but with building freecad on macos catalina.

freecad still relies on qt v5 and macos homebrew provides both qt v6 and v5.

the quick fix is to unlink qt v6 if you're building with cmake

brew unlink qt

i tried prepending my path with the /usr/local/opt/qt@5/bin but that unfortunately that's not enought for the cmake process to not pick up on the qt v6 installation. so during your cmake build steps unlinking qt v6 if your building against qt v5 aiding in my freecad installation process in not having this error.

i hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants