I'm facing a rather weird error. I can see on the wiki that we can build vtk with support for qt5. However, when trying to do so and first configuring with cmake I get the following output:
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.2/Modules/FindQt4.cmake:1326 (message):
Found unsuitable Qt version "5.4.2" from
C:/Qt/5.4/msvc2012_opengl/bin/qmake.exe, this code requires Qt 4.x
Call Stack (most recent call first):
GUISupport/Qt/CMakeLists.txt:71 (find_package)
I have followed previous posts on SO like: How to find qt5 CMake module on windows
or
cmake does not find qt 5.1.1 but they do not solve my problem so far.
I have tried to set CMAKE_PREFIX_PATH to C:/Qt/5.4/msvc2012_opengl/ and QT_QMAKE_EXECUTABLE to C:/Qt/5.4/msvc2012_opengl/bin/qmake.exe
And yet it doesn't work. Does anyone have an explanation for that?
Did you do step 3 and 4 here? : Combining Qt 5.4.1 with vtk 6.2.0 (using CMake GUI 3.2.1) on windows
I'm guessing you didn't change VTK_QT_VERSION to 5
Related
I am trying to build some code using cmake. The code uses some Boost libraries. Because of that I try to find Boost in the cmakefile:
find_package(Boost 1.65.1 REQUIRED COMPONENTS unit_test_framework program_options )
I have installed boost version 1.58 via apt (I am using Linux Mint 18.3), so I obviously get the error message when trying to cmake the code:
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.
Boost version: 1.58.0
Boost include path: /usr/include
Detected version of Boost is too old. Requested version was 1.65.1 (or newer).
Call Stack (most recent call first):
CMakeLists.txt:14 (find_package)
-- Configuring incomplete, errors occurred!
So I went on and downloaded Boost 1.65.1 by source and built it the intended way and installed it with the prefix
sudo ./b2 install --prefix=/usr/include
When I try to build the code again, it still gives the exact same error message as before, stating that it didn't find the newer version. I have tried to uninstall version 1.58 and build, but then cmake doesn't find Boost at all.
How can I install Boost in a way, that cmake is able to find it?
Thanks in advance,
cheers!
When changing the version information of Boost in a find_package(Boost) call you need to clear the CMakeCache.txt file. Otherwise the cached information from the previous run is used.
I'm using Win10-x64.
I install Visual Studio 2010, CUDA 7.5, OptiX SDK 3.9.0 and CMake 3.5 in order.
Then I follow the INSTALL-WIN.txt in OptiX/SDK/ and try to compile the samples. I press configure, then:
CMake Error at CMake/FindOptiX.cmake:75 (message):
optix library not found. Please locate before proceeding.
Call Stack (most recent call first):
CMake/FindOptiX.cmake:84 (OptiX_report_error)
CMakeLists.txt:189 (find_package)
Then I copy /../lib64/* to /../lib/* and /../bin64/* to /../bin/*
Error above seem to be fixed but new ERROR:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
linked by target "ocean" in directory C:/ProgramData/NVIDIA Corporation/OptiX SDK 3.9.0/SDK/ocean
I try CMake3.0 and get the same result.
Three month ago, OptiX 3.9 was released. ALL 32-bit support has been removed.
If you compile the file with 32-bit compiler, CMake will report this error.
The INSTALL-WIN.txt document in the \SDK directory is updated, and it reminds user to compile with 64-bit compiler. Just choose the compiler with the "win64" suffix.
win64 compiler
I've tried to link wxWidgets 3.0.2 to my C++ project but CMake can't seem to find it.
The wxWidgets that I'm trying to get CMake to find is from wxMSW-Setup-3.0.2.exe
This is the error it gives me:
-- Building for: Visual Studio 12 2013
CMake Error at D:/Program Files (x86)/CMake/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find wxWidgets (missing: wxWidgets_FOUND)
Call Stack (most recent call first):
D:/Program Files (x86)/CMake/share/cmake-3.3/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
D:/Program Files (x86)/CMake/share/cmake-3.3/Modules/FindwxWidgets.cmake:871 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:66 (find_package)
-- Configuring incomplete, errors occurred!
CMakeLists.txt:66 refers to this line:
find_package(wxWidgets REQUIRED core base)
I've tried changing the CMake generator, and running set(wxWidgets_ROOT_DIR "C:/wxWidgets-3.0.2"), both of which didn't fix the problem.
CMake is version 3.3.1.
I think cmake used environement variable to find wxwidgets. You have to set wxDir or wxWin variable to C:/wxWidgets-3.0.2
Use find_package(wxWidgets REQUIRED gl core base OPTIONAL_COMPONENTS net) instead of find_package(wxWidgets REQUIRED COMPONENTS core base). And when you build the wxWidgets https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW, use build the static libraries instead of dynamic libraries, I fixed it by using these two steps.
this is my first post so please be gentle!
I'm getting what appear to be cmake errors when trying to configure an install of pcl 1.7 in OSX 10.8.5. The error which appears 18 times is:
Performing Test OpenMP_FLAG_DETECTED - Failed
and then after the 18 failed searches for OpenMP:
Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
Not found OpenMP
I'm also getting a red error (using cmake GUI) stating:
CMake Error at cmake/Modules/FindEigen.cmake:25 (file):
file Internal CMake error when trying to open file:
/Library/Frameworks/Eigen.framework/Eigen/src/Core/util/Macros.h for
reading.
Call Stack (most recent call first):
CMakeLists.txt:238 (find_package)
But then followed in black by:
Found Eigen: /Library/Frameworks/Eigen.framework
Eigen found (include: /Library/Frameworks/Eigen.framework, version: ..)
so perhaps this isn't the issue (also there are no references to Eigen in the CMakeError.log.
Any help diagnosing or fixing the problem would be greatly appreciated.
Thanks,
Mark
So it seems the OpenMP errors may be able to be resolved by switching the compiler from Clang to g++, though I haven't done this as I'll be OK without OpenMP. The Eigen error (which was what was halting the build) was fixed by uninstalling then reinstalling MacPorts.
I'm trying to build the latest sources of keepassX on OS X which I have found here: http://gitorious.org/keepassx .
I'm getting this error message complaining about a missing Qt4 library:
ernst#cnap-b13-01 ~/Temp/keepassx/build
[264] : cmake [-DCMAKE_INSTALL_PREFIX=/usr/local] [-DCMAKE_VERBOSE_MAKEFILE=ON] [-DWITH_GUI_TESTS=ON] ..
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find Qt4 (missing: QT_QMAKE_EXECUTABLE QT_MOC_EXECUTABLE
QT_RCC_EXECUTABLE QT_INCLUDE_DIR QT_LIBRARY_DIR QT_QTCORE_INCLUDE_DIR
QT_QTCORE_LIBRARY QT_QTGUI_INCLUDE_DIR QT_QTGUI_LIBRARY
QT_QTTEST_INCLUDE_DIR QT_QTTEST_LIBRARY QT_UIC_EXECUTABLE) (Required is at
least version "4.6.0")
Call Stack (most recent call first):
/Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindQt4.cmake:1171 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:68 (find_package)
-- Configuring incomplete, errors occurred!
Any ideas on how to get this compiling?
I was able to solve this by installing the Qt SDK using the Mac OS X online installer and passing -DQT_QMAKE_EXECUTABLE=~/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake to cmake.
Note that as the /Developer directory is no longer there with XCode 4.3 I also had to do sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /Developer in order for keepassx to find some header files and compile successfully.
If Qt4 is installed in your system set QT_QMAKE_EXECUTABLE to the path for the qmake binary. You can do that in cmake-gui or ccmake. Or even with the -D parameter to cmake.
Use the option -no-framework when configuring qt:
./configure -no-framework -static -prefix ~/Libraries/qt-installed