cmake + qt + vtk: Compilation errors in macOS MojaveHow to check for an active Internet connection on iOS or macOS?Where is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?CGAL Program (and Examples) Not Getting Compiled in Mac OS X 10.7 LionQt 5.1 Beta Error using std::atomic c++11 featureHow do I install pip on macOS or OS X?nvcc on mac osx 10.9 unsupported optionCompiling CGAL programs on mac, installed using macportsGetting error while compiling Titanium project within Xcode: -dynamic not specified the following flags are invalid: -ObjCgrpc can't make libgpr.a lib on MacOSXCompiling VTK-8.1.2 on MacBook Pro
Was Robin Hood's point of view ethically sound?
Matrices upper triangular alignment
CBP interview, how serious should I take it?
How do I preserve the line ordering for two "equal" strings while sorting and ignoring the case?
Are there any space probes or landers which regained communication after being lost?
Should I use my toaster oven for slow roasting?
Dividing Divisive Divisors
My favorite color is blue what is your favorite color?
How do I politely hint customers to leave my store, without pretending to need leave store myself?
Using the Fruit soaked in vodka
SQL Server table with 4,000,000 rows is 40GB
Is the space of Radon measures a Polish space or at least separable?
Is there a star over my head?
Are the definite and indefinite integrals actually two different things? Where is the flaw in my understanding?
What's the biggest difference between these two photos?
How is the Team Scooby Doo funded?
Does the mana ability restriction of Pithing Needle refer to the cost or the effect of an activated ability?
How much power do LED smart bulb wireless control systems consume when the light is turned off?
Wrathful Smite, and the term 'Creature'
Does the word “uzi” need to be capitalized?
Do Milankovitch Cycles fully explain climate change?
Might have gotten a coworker sick, should I address this?
What is negative current?
Have there been any countries that voted themselves out of existence?
cmake + qt + vtk: Compilation errors in macOS Mojave
How to check for an active Internet connection on iOS or macOS?Where is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?CGAL Program (and Examples) Not Getting Compiled in Mac OS X 10.7 LionQt 5.1 Beta Error using std::atomic c++11 featureHow do I install pip on macOS or OS X?nvcc on mac osx 10.9 unsupported optionCompiling CGAL programs on mac, installed using macportsGetting error while compiling Titanium project within Xcode: -dynamic not specified the following flags are invalid: -ObjCgrpc can't make libgpr.a lib on MacOSXCompiling VTK-8.1.2 on MacBook Pro
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm running macOS Mojave (10.14.3).
After the upgrade to Mojave something in my system changed and I no longer can compile code having VTK
and Qt
.
A (not) working example can be found in the examples given by VTK.
It's worth to mention, that I can compile the other examples not involving qt
.
I use homebrew
to install everything I need.
Hier are the logs:
cmake ..
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VTK_VERSION: 8.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chraibi/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build
and
make
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: invalid token at start of a preprocessor expression
#if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:1: error: unknown type name 'Q_DECL_CONST_FUNCTION'
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:23: error: expected unqualified-id
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:5: error: unknown type name 'Q_ENUM'
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:19: error: expected ';' at end of declaration list
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:35: error: use of undeclared identifier 'ControlType'
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:5: error: unknown type name 'Q_FLAG'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:12: error: duplicate member 'ControlTypes'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:21: note: previous declaration is here
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:25: error: expected ';' at end of declaration list
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:5: error: unknown type name 'Q_DECL_RELAXED_CONSTEXPR'
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:30: error: expected member name or ';' after declaration specifiers
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:136:73: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR Qt::Orientations expandingDirections() const Q_DECL_NOTHROW {
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:153:58: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR int horizontalStretch() const Q_DECL_NOTHROW return static_cast<int>(bits.horStretch);
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:176:47: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR QSizePolicy(int i) Q_DECL_NOTHROW : data(i)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:50: error: unknown type name 'Bits'
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:57: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:223:9: error: unknown type name 'Bits'
Bits bits;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/all] Error 2
make: *** [all] Error 2
Similar error I get with cmake -DCMAKE_CXX_COMPILER=g++-8
, where g++-8 is installed with brew
Maybe I should mention, there is a software using vtk
and qt
that I can install via brew
without any problems. The same software cannot be compiled directly (cmake --> make).
Could be something with my OS is wrong?
c++ macos qt cmake vtk
add a comment |
I'm running macOS Mojave (10.14.3).
After the upgrade to Mojave something in my system changed and I no longer can compile code having VTK
and Qt
.
A (not) working example can be found in the examples given by VTK.
It's worth to mention, that I can compile the other examples not involving qt
.
I use homebrew
to install everything I need.
Hier are the logs:
cmake ..
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VTK_VERSION: 8.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chraibi/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build
and
make
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: invalid token at start of a preprocessor expression
#if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:1: error: unknown type name 'Q_DECL_CONST_FUNCTION'
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:23: error: expected unqualified-id
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:5: error: unknown type name 'Q_ENUM'
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:19: error: expected ';' at end of declaration list
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:35: error: use of undeclared identifier 'ControlType'
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:5: error: unknown type name 'Q_FLAG'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:12: error: duplicate member 'ControlTypes'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:21: note: previous declaration is here
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:25: error: expected ';' at end of declaration list
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:5: error: unknown type name 'Q_DECL_RELAXED_CONSTEXPR'
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:30: error: expected member name or ';' after declaration specifiers
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:136:73: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR Qt::Orientations expandingDirections() const Q_DECL_NOTHROW {
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:153:58: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR int horizontalStretch() const Q_DECL_NOTHROW return static_cast<int>(bits.horStretch);
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:176:47: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR QSizePolicy(int i) Q_DECL_NOTHROW : data(i)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:50: error: unknown type name 'Bits'
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:57: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:223:9: error: unknown type name 'Bits'
Bits bits;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/all] Error 2
make: *** [all] Error 2
Similar error I get with cmake -DCMAKE_CXX_COMPILER=g++-8
, where g++-8 is installed with brew
Maybe I should mention, there is a software using vtk
and qt
that I can install via brew
without any problems. The same software cannot be compiled directly (cmake --> make).
Could be something with my OS is wrong?
c++ macos qt cmake vtk
1
I had a similar problem a few days ago. In my case, I had Qt4 and Qt5 both installed. I did upgrade to the latest version of Mojave and Xcode and then uninstalled Qt4. Also, add the system path to your compilation: "/usr/local/include" and "usr/local/lib" because Mojave is no longer including them in the system paths.
– mohabouje
Mar 28 at 9:40
I know several people who do VTK development on Mojave(including myself) and it works fine. Which Qt are you using? Did you build VTK from source and set VTK_DIR in your example's CMakeCache?
– Liu Hao Cheng
Mar 28 at 20:15
Yeah for me too VTK works fine.. until I combine it with Qt. Then it's not fun anymore. As you can see in the question, I use brew to install everything.. and it's not my example, but from VTK.
– Tengis
Mar 28 at 23:24
I have a similar issue with CMake + Qt5 + Catch2, when usingtarget_link_libraries(target Qt5::Widgets Catch2::Catch2)
. @Tengis have you ever managed to solve this?
– khrykin
Jul 8 at 13:12
Ok! So I had Qt 4 installed by Homebrew on my system, without knowing it!brew uninstall qt
solved it. (I have Qt5 installed manually)
– khrykin
Jul 8 at 14:24
add a comment |
I'm running macOS Mojave (10.14.3).
After the upgrade to Mojave something in my system changed and I no longer can compile code having VTK
and Qt
.
A (not) working example can be found in the examples given by VTK.
It's worth to mention, that I can compile the other examples not involving qt
.
I use homebrew
to install everything I need.
Hier are the logs:
cmake ..
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VTK_VERSION: 8.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chraibi/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build
and
make
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: invalid token at start of a preprocessor expression
#if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:1: error: unknown type name 'Q_DECL_CONST_FUNCTION'
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:23: error: expected unqualified-id
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:5: error: unknown type name 'Q_ENUM'
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:19: error: expected ';' at end of declaration list
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:35: error: use of undeclared identifier 'ControlType'
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:5: error: unknown type name 'Q_FLAG'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:12: error: duplicate member 'ControlTypes'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:21: note: previous declaration is here
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:25: error: expected ';' at end of declaration list
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:5: error: unknown type name 'Q_DECL_RELAXED_CONSTEXPR'
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:30: error: expected member name or ';' after declaration specifiers
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:136:73: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR Qt::Orientations expandingDirections() const Q_DECL_NOTHROW {
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:153:58: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR int horizontalStretch() const Q_DECL_NOTHROW return static_cast<int>(bits.horStretch);
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:176:47: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR QSizePolicy(int i) Q_DECL_NOTHROW : data(i)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:50: error: unknown type name 'Bits'
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:57: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:223:9: error: unknown type name 'Bits'
Bits bits;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/all] Error 2
make: *** [all] Error 2
Similar error I get with cmake -DCMAKE_CXX_COMPILER=g++-8
, where g++-8 is installed with brew
Maybe I should mention, there is a software using vtk
and qt
that I can install via brew
without any problems. The same software cannot be compiled directly (cmake --> make).
Could be something with my OS is wrong?
c++ macos qt cmake vtk
I'm running macOS Mojave (10.14.3).
After the upgrade to Mojave something in my system changed and I no longer can compile code having VTK
and Qt
.
A (not) working example can be found in the examples given by VTK.
It's worth to mention, that I can compile the other examples not involving qt
.
I use homebrew
to install everything I need.
Hier are the logs:
cmake ..
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- VTK_VERSION: 8.1.2
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/chraibi/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build
and
make
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:51:82: error: invalid token at start of a preprocessor expression
#if !defined(Q_CC_GNU) || defined(Q_CC_INTEL) || defined(Q_CC_CLANG) || Q_CC_GNU >= 408
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:1: error: unknown type name 'Q_DECL_CONST_FUNCTION'
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:68:23: error: expected unqualified-id
Q_DECL_CONST_FUNCTION inline uint qHash(QSizePolicy key, uint seed = 0) Q_DECL_NOTHROW;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:5: error: unknown type name 'Q_ENUM'
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:91:19: error: expected ';' at end of declaration list
Q_ENUM(Policy)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:35: error: use of undeclared identifier 'ControlType'
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:5: error: unknown type name 'Q_FLAG'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:12: error: duplicate member 'ControlTypes'
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:110:21: note: previous declaration is here
Q_DECLARE_FLAGS(ControlTypes, ControlType)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:111:25: error: expected ';' at end of declaration list
Q_FLAG(ControlTypes)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:5: error: unknown type name 'Q_DECL_RELAXED_CONSTEXPR'
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:132:30: error: expected member name or ';' after declaration specifiers
Q_DECL_RELAXED_CONSTEXPR void setHorizontalPolicy(Policy d) Q_DECL_NOTHROW bits.horPolicy = d;
~~~~~~~~~~~~~~~~~~~~~~~~ ^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:136:73: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR Qt::Orientations expandingDirections() const Q_DECL_NOTHROW {
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:153:58: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR int horizontalStretch() const Q_DECL_NOTHROW return static_cast<int>(bits.horStretch);
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:176:47: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR QSizePolicy(int i) Q_DECL_NOTHROW : data(i)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:50: error: unknown type name 'Bits'
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:178:57: error: expected ';' at end of declaration list
QT_SIZEPOLICY_CONSTEXPR explicit QSizePolicy(Bits b) Q_DECL_NOTHROW : bits(b)
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:223:9: error: unknown type name 'Bits'
Bits bits;
^
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp:2:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/moc_SideBySideRenderWindowsQt.cpp:9:
In file included from /Users/user/Downloads/VTK_Examples/SideBySideRenderWindowsQt/build/SideBySideRenderWindowsQt_autogen/EWIEGA46WW/../../../SideBySideRenderWindowsQt.h:6:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/QMainWindow:1:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qmainwindow.h:44:
In file included from /usr/local/opt/qt/lib/QtWidgets.framework/Headers/qwidget.h:52:
/usr/local/opt/qt/lib/QtWidgets.framework/Headers/qsizepolicy.h:231:33: error: use of undeclared identifier 'Q_RELOCATABLE_TYPE'; did you mean 'Q_MOVABLE_TYPE'?
Q_DECLARE_TYPEINFO(QSizePolicy, Q_RELOCATABLE_TYPE);
^
/usr/local/include/QtCore/qglobal.h:2272:5: note: 'Q_MOVABLE_TYPE' declared here
Q_MOVABLE_TYPE = 0x2,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/SideBySideRenderWindowsQt_autogen/mocs_compilation.cpp.o] Error 1
make[1]: *** [CMakeFiles/SideBySideRenderWindowsQt.dir/all] Error 2
make: *** [all] Error 2
Similar error I get with cmake -DCMAKE_CXX_COMPILER=g++-8
, where g++-8 is installed with brew
Maybe I should mention, there is a software using vtk
and qt
that I can install via brew
without any problems. The same software cannot be compiled directly (cmake --> make).
Could be something with my OS is wrong?
c++ macos qt cmake vtk
c++ macos qt cmake vtk
asked Mar 28 at 8:26
TengisTengis
1,1694 gold badges20 silver badges41 bronze badges
1,1694 gold badges20 silver badges41 bronze badges
1
I had a similar problem a few days ago. In my case, I had Qt4 and Qt5 both installed. I did upgrade to the latest version of Mojave and Xcode and then uninstalled Qt4. Also, add the system path to your compilation: "/usr/local/include" and "usr/local/lib" because Mojave is no longer including them in the system paths.
– mohabouje
Mar 28 at 9:40
I know several people who do VTK development on Mojave(including myself) and it works fine. Which Qt are you using? Did you build VTK from source and set VTK_DIR in your example's CMakeCache?
– Liu Hao Cheng
Mar 28 at 20:15
Yeah for me too VTK works fine.. until I combine it with Qt. Then it's not fun anymore. As you can see in the question, I use brew to install everything.. and it's not my example, but from VTK.
– Tengis
Mar 28 at 23:24
I have a similar issue with CMake + Qt5 + Catch2, when usingtarget_link_libraries(target Qt5::Widgets Catch2::Catch2)
. @Tengis have you ever managed to solve this?
– khrykin
Jul 8 at 13:12
Ok! So I had Qt 4 installed by Homebrew on my system, without knowing it!brew uninstall qt
solved it. (I have Qt5 installed manually)
– khrykin
Jul 8 at 14:24
add a comment |
1
I had a similar problem a few days ago. In my case, I had Qt4 and Qt5 both installed. I did upgrade to the latest version of Mojave and Xcode and then uninstalled Qt4. Also, add the system path to your compilation: "/usr/local/include" and "usr/local/lib" because Mojave is no longer including them in the system paths.
– mohabouje
Mar 28 at 9:40
I know several people who do VTK development on Mojave(including myself) and it works fine. Which Qt are you using? Did you build VTK from source and set VTK_DIR in your example's CMakeCache?
– Liu Hao Cheng
Mar 28 at 20:15
Yeah for me too VTK works fine.. until I combine it with Qt. Then it's not fun anymore. As you can see in the question, I use brew to install everything.. and it's not my example, but from VTK.
– Tengis
Mar 28 at 23:24
I have a similar issue with CMake + Qt5 + Catch2, when usingtarget_link_libraries(target Qt5::Widgets Catch2::Catch2)
. @Tengis have you ever managed to solve this?
– khrykin
Jul 8 at 13:12
Ok! So I had Qt 4 installed by Homebrew on my system, without knowing it!brew uninstall qt
solved it. (I have Qt5 installed manually)
– khrykin
Jul 8 at 14:24
1
1
I had a similar problem a few days ago. In my case, I had Qt4 and Qt5 both installed. I did upgrade to the latest version of Mojave and Xcode and then uninstalled Qt4. Also, add the system path to your compilation: "/usr/local/include" and "usr/local/lib" because Mojave is no longer including them in the system paths.
– mohabouje
Mar 28 at 9:40
I had a similar problem a few days ago. In my case, I had Qt4 and Qt5 both installed. I did upgrade to the latest version of Mojave and Xcode and then uninstalled Qt4. Also, add the system path to your compilation: "/usr/local/include" and "usr/local/lib" because Mojave is no longer including them in the system paths.
– mohabouje
Mar 28 at 9:40
I know several people who do VTK development on Mojave(including myself) and it works fine. Which Qt are you using? Did you build VTK from source and set VTK_DIR in your example's CMakeCache?
– Liu Hao Cheng
Mar 28 at 20:15
I know several people who do VTK development on Mojave(including myself) and it works fine. Which Qt are you using? Did you build VTK from source and set VTK_DIR in your example's CMakeCache?
– Liu Hao Cheng
Mar 28 at 20:15
Yeah for me too VTK works fine.. until I combine it with Qt. Then it's not fun anymore. As you can see in the question, I use brew to install everything.. and it's not my example, but from VTK.
– Tengis
Mar 28 at 23:24
Yeah for me too VTK works fine.. until I combine it with Qt. Then it's not fun anymore. As you can see in the question, I use brew to install everything.. and it's not my example, but from VTK.
– Tengis
Mar 28 at 23:24
I have a similar issue with CMake + Qt5 + Catch2, when using
target_link_libraries(target Qt5::Widgets Catch2::Catch2)
. @Tengis have you ever managed to solve this?– khrykin
Jul 8 at 13:12
I have a similar issue with CMake + Qt5 + Catch2, when using
target_link_libraries(target Qt5::Widgets Catch2::Catch2)
. @Tengis have you ever managed to solve this?– khrykin
Jul 8 at 13:12
Ok! So I had Qt 4 installed by Homebrew on my system, without knowing it!
brew uninstall qt
solved it. (I have Qt5 installed manually)– khrykin
Jul 8 at 14:24
Ok! So I had Qt 4 installed by Homebrew on my system, without knowing it!
brew uninstall qt
solved it. (I have Qt5 installed manually)– khrykin
Jul 8 at 14:24
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393028%2fcmake-qt-vtk-compilation-errors-in-macos-mojave%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55393028%2fcmake-qt-vtk-compilation-errors-in-macos-mojave%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I had a similar problem a few days ago. In my case, I had Qt4 and Qt5 both installed. I did upgrade to the latest version of Mojave and Xcode and then uninstalled Qt4. Also, add the system path to your compilation: "/usr/local/include" and "usr/local/lib" because Mojave is no longer including them in the system paths.
– mohabouje
Mar 28 at 9:40
I know several people who do VTK development on Mojave(including myself) and it works fine. Which Qt are you using? Did you build VTK from source and set VTK_DIR in your example's CMakeCache?
– Liu Hao Cheng
Mar 28 at 20:15
Yeah for me too VTK works fine.. until I combine it with Qt. Then it's not fun anymore. As you can see in the question, I use brew to install everything.. and it's not my example, but from VTK.
– Tengis
Mar 28 at 23:24
I have a similar issue with CMake + Qt5 + Catch2, when using
target_link_libraries(target Qt5::Widgets Catch2::Catch2)
. @Tengis have you ever managed to solve this?– khrykin
Jul 8 at 13:12
Ok! So I had Qt 4 installed by Homebrew on my system, without knowing it!
brew uninstall qt
solved it. (I have Qt5 installed manually)– khrykin
Jul 8 at 14:24