Looking for Q_WS_X11 - not found - c++

Trying to build code for ADTF using cmake and I get the following error. Could anyone let me know what is missing from my end? OS is Windows
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found OpenGL: opengl32
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Qt4 (missing: QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE
QT_UIC_EXECUTABLE) (found version "4.7.1")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.11/Modules/FindQt4.cmake:1328 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:76 (find_package)
-- Configuring incomplete, errors occurred!
See also "D:/ViL_ADTF_filter/build/CMakeFiles/CMakeOutput.log".
See also "D:/ViL_ADTF_filter/build/CMakeFiles/CMakeError.log".

Just provided the path of all the missing executables in the CMakeLists and it worked. Thanks for all the responses

Related

Finding OpenBLAS on Windows with CMake

I followed the instructions here:
https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio
for building and installing OpenBLAS, specifically 1. "Native (MSVC) ABI".
And now all the includes and libraries and CMake files are in C:/opt like it wanted.
I then saw I could use FindBLAS in my project's CMakeFile so I added
FindBLAS(), but apparently it's not a command?
I saw everyone who mentioned FindBLAS instead wrote:
set(BLA_VENDOR OpenBLAS)
find_package(BLAS REQUIRED)
so I'm actually pretty confused. What is FindBLAS? Why can't I find any examples of anyone using it?
But then I tried the set and find_package route I saw everywhere and got:
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find BLAS (missing: BLAS_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.25/Modules/FindBLAS.cmake:1346 (find_package_handle_standard_args)
I tried setting the environment variables, resetting, everything I can think of. I'm not sure why CMake refuses to find the library and update ${BLAS_LIBRARIES}.

Keep receiving "CMake Error: Could NOT find Boost" yet it did find it

Cloned a repository and installed the Boost library. My IDE (CLion) keeps telling me
CMake Error at C:/Program Files/JetBrains/CLion 2021.3/bin/cmake/win/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Boost (missing: regex date_time system filesystem
unit_test_framework program_options) (found version "1.67.0")
Call Stack (most recent call first):
C:/Program Files/JetBrains/CLion 2021.3/bin/cmake/win/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/JetBrains/CLion 2021.3/bin/cmake/win/share/cmake-3.21/Modules/FindBoost.cmake:2345 (find_package_handle_standard_args)
CMakeLists.txt:29 (find_package)
Prior to this, I was trying to use the most updated Boost library which led me to more errors, after changing it to the correct library, those errors went away, leaving me with this. This error also remains when trying to use the new library too.
I have tried set(BOOST_ROOT C:/local/boost_1_71_0) as was the correct answer on another similar post, yet it didn't work. I have also tried adding it to my path, which also does nothing. To note: It is strange because it says the version number of the Boost library yet it says could not be found.
I am using CLion's bundled CMake, but I also have the official CMake installed just in case. I don't think CLion's cmake is the issue.

Linking of Openscenegraph libraries for CMake

Well,I am new to CMake and want to edit flight simulation code in eclipse instead of visual studio. For that purpose, I downloaded the source code of Simgear, CMake, Boost libraries, open scene graph and openalsoft.
Now I have all the data available but I dont know where to place some of these libraries. As a result, when I run CMake and give reference to my flightgear code, it complains that the openscenegraph libraries are not installed.
Please help me with where I need to put all these files so as to convert my code to eclipse using CMake. I have already installed boost and openal libraries. Only issue is of openscenegraph libraries which I put in program files at the following path "C:\Program Files\OpenSceneGraph-3.4.0" but CMake can't access it. The error code is
Eclipse version is set to 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.
version is 2016 dot 3 dot 1
ignoring: ^C:/Media/Project/study material/flight gear/simgear-2016.3.1/.git;\\.gitignore;Makefile.am;~$;
Library installation directory: lib
Boost version: 1.62.0
SimGear mode: NORMAL
Found OpenAL: C:/Program Files/OpenAL/OpenAL32.lib
Sound support: ENABLED
Could NOT find osgText (missing: OSGTEXT_LIBRARY OSGTEXT_INCLUDE_DIR)
Could NOT find osgSim (missing: OSGSIM_LIBRARY OSGSIM_INCLUDE_DIR)
Could NOT find osgDB (missing: OSGDB_LIBRARY OSGDB_INCLUDE_DIR)
Could NOT find osgParticle (missing: OSGPARTICLE_LIBRARY OSGPARTICLE_INCLUDE_DIR)
Could NOT find osgGA (missing: OSGGA_LIBRARY OSGGA_INCLUDE_DIR)
Could NOT find osgViewer (missing: OSGVIEWER_LIBRARY OSGVIEWER_INCLUDE_DIR)
Could NOT find osgUtil (missing: OSGUTIL_LIBRARY OSGUTIL_INCLUDE_DIR)
Could NOT find osg (missing: OSG_LIBRARY OSG_INCLUDE_DIR)
Could NOT find OpenThreads (missing: OPENTHREADS_LIBRARY OPENTHREADS_INCLUDE_DIR)
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES
OPENSCENEGRAPH_INCLUDE_DIR OSGTEXT_FOUND OSGSIM_FOUND OSGDB_FOUND
OSGPARTICLE_FOUND OSGGA_FOUND OSGVIEWER_FOUND OSGUTIL_FOUND OSG_FOUND
OPENTHREADS_FOUND) (Required is at least version "3.2.0")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindOpenSceneGraph.cmake:223 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:243 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/shajeeh/Documents/CMake/CMakeFiles/CMakeOutput.log".
I'm not a CMake expert, here some things I did in order to create ROS & OSG project in Linux:
add an environment variable (if it is not there yet) to the .bashrc file:
export PATH=${PATH}: .../OpenSceneGraph-3.4.0/bin (your absolute path)
then in CMake file add:
FIND_PACKAGE ( OpenSceneGraph COMPONENTS osgSim osgUtil osgDB osgFX osgGA osgTerrain osgViewer osgText osgWidget osgManipulator osg osgShadow)
target_link_libraries(name_of_your_executable ${PROJECT_NAME} ${OPENSCENEGRAPH_LIBRARIES})
For more information check CMake documentation here and here

Failed to Create Meshlab Visual Studio 2013 Project

I'm trying to open meshlab project in visual studio 2013. I did install Cmake and Qt 5.3.0 on my windows 10 and then run this command :
cmake .. -G "Visual Studio 12 Win64"
and after running that :
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
*** Configuring MeshLab Version 1.3.2 ****
-- Found OpenGL: opengl32
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - not found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - not found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - not found
-- Looking for cos in m
-- Looking for cos in m - not found
-- lmdemo will be linked against levmar;lapack;blas;f2c
CMake Error at E:/MyWorkSpace/Meshinator/Qt/Qt5.3.0/5.3/msvc2013_64_opengl/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:14 (message):
Failed to find "glu32" in "" with CMAKE_CXX_LIBRARY_ARCHITECTURE "".
Call Stack (most recent call first):
E:/MyWorkSpace/Meshinator/Qt/Qt5.3.0/5.3/msvc2013_64_opengl/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:50 (_qt5gui_find_extra_libs)
E:/MyWorkSpace/Meshinator/Qt/Qt5.3.0/5.3/msvc2013_64_opengl/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:152 (include)
E:/MyWorkSpace/Meshinator/Qt/Qt5.3.0/5.3/msvc2013_64_opengl/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:94 (find_package)
src/other/structuresynth/CMakeLists.txt:17 (find_package)
-- Configuring incomplete, errors occurred!
See also "E:/MyWorkSpace/Meshinator/meshlab-master/_build/CMakeFiles/CMakeOutput.log".
See also "E:/MyWorkSpace/Meshinator/meshlab-master/_build/CMakeFiles/CMakeError.log".
As you see I get this error from cmak :
CMake Error at E:/MyWorkSpace/Meshinator/Qt/Qt5.3.0/5.3/msvc2013_64_opengl/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:14 (message):
Failed to find "glu32" in "" with CMAKE_CXX_LIBRARY_ARCHITECTURE "".
I did google that error and find this answer :
To solve the problem use this line : set (CMAKE_LIBRARY_PATH “C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64”)
Now I don't know where I can add this line? please help me!
Add it to the CMakeList.txt that apperantly recides on the higher level directory from where you try to run CMake.

Cmake error while building OGRE

I am building OGRE source using cmake ../../ogre_src_v1-8-1 in my build directory. I have looked into many similar errors but nothing has worked out for me.
The output of the cmake command mentioned above gives following output:
-- Configuring OGRE 1.8.1
-- Detected g++ 4.8
-- Enabling GCC visibility flags
-- Search path: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies
-- Looking for ZLIB...
-- Found ZLIB: optimized;/usr/lib/x86_64-linux-gnu/libz.so;debug;/usr/lib/x86_64-linux-gnu/libz.so
-- Looking for ZZip...
-- Found ZZip: optimized;/usr/lib/x86_64-linux-gnu/libzzip.so;debug;/usr/lib/x86_64-linux-gnu/libzzip.so
-- Looking for FreeImage...
-- checking for module 'freeimage'
-- package 'freeimage' not found
-- Found FreeImage: optimized;/usr/lib/libfreeimage.so;debug;/usr/lib/libfreeimage.so
-- Looking for FREETYPE...
-- CMAKE_PREFIX_PATH: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- CMAKE_PREFIX_PATH: /home/kamal/Documents/ogre_src_v1-8-1/build/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/build/../Dependencies;/home/kamal/Documents/ogre_src_v1-8-1/../Dependencies;/usr/local;/usr/lib/x86_64-linux-gnu
-- Could not locate FREETYPE
-- Looking for Cg...
-- checking for module 'Cg'
-- package 'Cg' not found
-- Found Cg: optimized;/usr/lib/x86_64-linux-gnu/libCg.so;debug;/usr/lib/x86_64-linux-gnu/libCg.so
-- Looking for POCO...
-- checking for module 'POCO'
-- package 'POCO' not found
-- Could not locate POCO
-- Looking for TBB...
-- Found TBB: optimized;/usr/lib/libtbb.so;debug;/usr/lib/libtbb.so
-- Looking for TBB_MALLOC...
-- Found TBB_MALLOC: optimized;/usr/lib/libtbbmalloc.so;debug;/usr/lib/libtbbmalloc.so
-- Looking for TBB_MALLOC_PROXY...
-- Found TBB_MALLOC_PROXY: optimized;/usr/lib/libtbbmalloc_proxy.so;debug;/usr/lib/libtbbmalloc_proxy.so
-- Looking for GLSL_Optimizer...
-- checking for module 'GLSL_Optimizer'
-- package 'GLSL_Optimizer' not found
-- Could not locate GLSL_Optimizer
-- Looking for HLSL2GLSL...
-- checking for module 'HLSL2GLSL'
-- package 'HLSL2GLSL' not found
-- Could not locate HLSL2GLSL
-- Looking for OIS...
-- Found OIS: optimized;/usr/lib/x86_64-linux-gnu/libOIS.so;debug;/usr/lib/x86_64-linux-gnu/libOIS.so
-- Looking for Softimage...
-- Could not locate Softimage
-- Looking for CppUnit...
-- checking for module 'cppunit'
-- package 'cppunit' not found
-- Could not locate CppUnit
CMake Error at CMake/Utils/MacroLogFeature.cmake:100 (MESSAGE):
-----------------------------------------------------------------------------
-- The following REQUIRED packages could NOT be located on your system.
-- Please install them before continuing this software installation.
-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>
-----------------------------------------------------------------------------
+ freetype: Portable font engine <http://www.freetype.org>
-----------------------------------------------------------------------------
Call Stack (most recent call first):
CMake/Dependencies.cmake:234 (MACRO_DISPLAY_FEATURE_LOG)
CMakeLists.txt:194 (include)
-- Configuring incomplete, errors occurred!
How to resolve this issue? Any help shall be appreciated!
It's missing the freetype library which is required for building OGRE. Make sure that the lib itself and the development package is installed on your system.
This might help, the OGRE wiki page with installation instructions for the prerequisites for various linux distros Install OGRE Prerequisite