Error on compile qml-material on windows - c++

How to compile and install the qml-material on windows7 machine ?
First of all I clone and compile extra-cmake-modules like below:
git clone git://anongit.kde.org/extra-cmake-modules
cd extra-cmake-modules
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
After that I run the Make command but with no output!(No error and no change!)
And for compile the qml-material I use the below instruction:
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
But I get error:
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/gcc.exe
-- Check for working C compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/gcc.exe -- 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: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/g++.exe
-- Check for working CXX compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Users/me/Documents/Github/ecm/ECMConfig.cmake:35 (include):
include could not find load file:
C:/Users/me/share/ECM/modules//ECMUseFindModules.cmake
Call Stack (most recent call first):
CMakeLists.txt:13 (find_package)
CMake Error at CMakeLists.txt:16 (include):
include could not find load file:
KDEInstallDirs
CMake Error at CMakeLists.txt:17 (include):
include could not find load file:
KDECMakeSettings
CMake Error at CMakeLists.txt:18 (include):
include could not find load file:
KDECompilerSettings
CMake Error at tests/CMakeLists.txt:1 (include):
include could not find load file:
ECMMarkAsTest
CMake Error at tests/CMakeLists.txt:13 (ecm_mark_as_test):
Unknown CMake command "ecm_mark_as_test".
-- Configuring incomplete, errors occurred!
I was try to use QtCreator to compile ECM and also the after that the qml-material, ECM compile and build fine without any error but the qml-material show above error too!!!
thanks,

I will provide my comment as an answer for a better overview:
To use qml-material it is not really necessary to "build" the project with cmake because the project itself contains only plain qml files.
I do not know why the guys switched from qmake to cmake system.
However all you need to do is to simply copy the file structure to your local file system:
checkout the project with git clone https://github.com/papyros/qml-material.git
copy the content of qml-material/modules/Material to Qt5.5.1/5.5/mingw/qml/Material and qml-material/modules/QtQuick/Controls/Styles/Material to Qt5.5.1/5.5/mingw/qml/QtQuick/Controls/Styles/Material where mingw stands for your Qt platform. Could also be gcc4.9 or something like this.
That`s all.

Related

Can't get CMAKE to compile a project

Here's the error I'm getting:
-- Building for: NMake Makefiles
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_86068\fast"
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/--REDACTED--/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_86068\fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_86068\fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (PROJECT)
-- Configuring incomplete, errors occurred!
See also "C:/--REDACTED--/socket.io-client-cpp-1.6.1/CMakeFiles/CMakeOutput.log".
See also "C:/--REDACTED--/socket.io-client-cpp-1.6.1/CMakeFiles/CMakeError.log".
For the record I am using:
gcc and g++ from MinGW 4.8.1
CMake 3.4.1
I have no idea what the issue could be, I've looked extensively online and have not found anywhere where somebody has gotten a solution, except in cases where it had to do with path issues where the path included non-latin characters or no write access, which is not the case for any of the directories in question. I seriously am about to give up completely on ever being able to get this to work, but I don't know what to do because I absolutely NEED the socket.io client for C++ for this project.
CMake is a utility which generates a "makefile" for different build systems. Here you generate a nmake makefile and it seems that you don't have nmake in your path.
You can launch CMake with option -G "MinGW Makefiles" in order to generate a makefile compatible with mingw make. Then issue the command:
mingw32-make

CMake can't detect gcc built-in functions such as sqrt, pow ,exp and so on

I just wanna use the CMake to detect whether some built-in functions of GCC exist. So I used the check_function_exists command to do some checking works. Here is my code snippet in CMakeLists.txt.
include (CheckFunctionExists)
set (CMAKE_REQUIRED_INCLUDES math.h)
set (CMAKE_REQUIRED_LIBRARIES m)
check_function_exists(sqrt HAVE_SQRT)
check_function_exists (pow HAVE_POW)
check_function_exists (exp HAVE_EXP)
check_function_exists (log HAVE_LOG)
Code snippet in TutorialConfig.h.in
// the configured options and settings for Tutorial
#define Tutorial_VERSION_MAJOR #Tutorial_VERSION_MAJOR#
#define Tutorial_VERSION_MINOR #Tutorial_VERSION_MINOR#
#cmakedefine USE_MYMATH
#cmakedefine HAVE_SQRT
#cmakedefine HAVE_POW
#cmakedefine HAVE_LOG
#cmakedefine HAVE_EXP
   However, directory when I executed Cmake command under my source directory. I got such error, weird.
-- The C compiler identification is GNU 7.0.0
-- The CXX compiler identification is GNU 7.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sqrt
CMake Error: The source directory "../build/CMakeFiles/CMakeTmp" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
CMake Error at /usr/share/cmake/Modules/CheckFunctionExists.cmake:70 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
CMakeLists.txt:23 (check_function_exists)
   However, the directory claimed in the error message is indeed exists.
$ ls -la ../build/CMakeFiles/CMakeTmp
total 0
drwxrwxrwx 1 root root 0 Apr 14 21:41 .
drwxrwxrwx 1 root root 0 Apr 14 20:32 ..
   I am not very expert in CMake, so I can't figure out what is the crux.
   Here is my log file outputed by CMake
Hope anyone who is familiar with CMake gives me a hand. Thanks in advance.
Error message
CMake Error: The source directory "../build/CMakeFiles/CMakeTmp" does not exist.
is possible if a relative path is used as a build directory.
While it is not explicitely stated in docs (and not checked by CMake itself), it is better to use absolute path as build directory.
Because build directory of the CMake project isn't designed to be moved to other place (or even on other machine), there is no reason for using relative path for it.

Error when using cmake on vk_chopper

So, I wanted to install Vulkan on ubuntu 16.10.
I decided to follow this guide
Unfortunately at step 9 get to the choppa, I got an error.
cmake .. did not work for me ; this is what happened
Log
ra141#ra141:~$ cd ~/vulkan
ra141#ra141:~/vulkan$ cd gl_vk_chopper
ra141#ra141:~/vulkan/gl_vk_chopper$ cd build
ra141#ra141:~/vulkan/gl_vk_chopper/build$ rm -rf ./*
ra141#ra141:~/vulkan/gl_vk_chopper/build$ export VK_SDK_PATH=/home/ra141/vulkan/VulkanSDK
ra141#ra141:~/vulkan/gl_vk_chopper/build$ cmake ..
-- The C compiler identification is GNU 6.2.0
-- The CXX compiler identification is GNU 6.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Processing Project gl_vk_chopper:
-- BASE_DIRECTORY = /home/ra141/vulkan/gl_vk_chopper/..
-- CMAKE_CURRENT_SOURCE_DIR = /home/ra141/vulkan/gl_vk_chopper
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found GLEW: /home/ra141/vulkan/shared_sources/glew/include
-- Could NOT find GLFW (missing: GLFW_INCLUDE_DIR GLFW_LIBRARY)
-- found Glew source code. Using it instead of library
-- VulkanSDK search paths:
-- VulkanSDK version:
CMake Warning at /home/ra141/vulkan/shared_sources/cmake/FindVulkanSDK.cmake:133 (message):
VULKANSDK not found.
either env. VK_SDK_PATH should be set directly to the right version to use (C:\VulkanSDK\1.0.1.1)
or you can specify in cmake VULKANSDK_LOCATION to the folder where VulkanSDK versions are put (C:\VulkanSDK)
Call Stack (most recent call first):
/home/ra141/vulkan/shared_sources/CMakeLists_include.txt:341 (find_package)
CMakeLists.txt:44 (_add_package_VulkanSDK)
-- Vulkan Root : VULKANSDK_ROOT_DIR-NOTFOUND
-- Vulkan include : VULKANSDK_INCLUDE_DIR-NOTFOUND
-- Vulkan Library : VULKAN_LIB-NOTFOUND
-- Could NOT find VULKANSDK (missing: VULKANSDK_INCLUDE_DIR VULKAN_LIB)
-- --> NOT using package VulkanSDK
-- --> using package AntTweakBar
-- Found ANTTWEAKBAR: /usr/include
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:
X11_Xcursor_LIB (ADVANCED)
linked by target "gl_vk_chopper" in directory /home/ra141/vulkan/gl_vk_chopper
linked by target "gl_vk_chopper" in directory /home/ra141/vulkan/gl_vk_chopper
linked by target "shared_sources" in directory /home/ra141/vulkan/shared_sources
X11_Xinerama_LIB (ADVANCED)
linked by target "gl_vk_chopper" in directory /home/ra141/vulkan/gl_vk_chopper
linked by target "gl_vk_chopper" in directory /home/ra141/vulkan/gl_vk_chopper
linked by target "shared_sources" in directory /home/ra141/vulkan/shared_sources
-- Configuring incomplete, errors occurred!
See also "/home/ra141/vulkan/gl_vk_chopper/build/CMakeFiles/CMakeOutput.log".
ra141#ra141:~/vulkan/gl_vk_chopper/build$
some help please?
Before running cmake, run the following command export VK_SDK_PATH=/path/to/vulkanSDK/version
Note, that is shall be full path (starting with /)
Be careful to run cmake .. from build folder. From the log, seems you start cmake from subfolder of the build folder. Better yet, clean it before reruning cmake:
cd build
rm -rf ./*
cmake ..

compiler seems cannot find boost/shared_ptr.hpp

I am using Mac with OS 10.11.6
I am trying to install OpenGV on my Mac. This is a part of dependencies that will be needed to build the OpenSfM library. So, what I did is:
brew install homebrew/science/ceres-solver
brew install boost-python
brew install eigen
git clone https://github.com/paulinus/opengv.git
cd opengv
mkdir build
cd build
cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON
make install
But I got this error:
In file included from /Users/hilman_dayo/opengv/src/relative_pose/modules/main.cpp:47:
/Users/hilman_dayo/opengv/include/opengv/math/Sturm.hpp:43:10: fatal error: 'boost/shared_ptr.hpp' file not found
#include <boost/shared_ptr.hpp>
^
1 error generated.
make[2]: *** [CMakeFiles/opengv.dir/src/relative_pose/modules/main.o] Error 1
make[1]: *** [CMakeFiles/opengv.dir/all] Error 2
make: *** [all] Error 2
How can I solve this? Already checked, and the file is there at /usr/local/include/boost/shared_ptr.hpp.
If it is ever needed, this is the output during cmake:
-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- 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
-- Checking for C++11 compiler
-- Checking for C++11 compiler - available
-- Performing Test SUPPORTS_STD_CXX11
-- Performing Test SUPPORTS_STD_CXX11 - Success
-- Performing Test SUPPORTS_STD_CXX01
-- Performing Test SUPPORTS_STD_CXX01 - Success
-- Found Eigen: /usr/local/include/eigen3 (Required is at least version "2.91.0")
CMake Warning at /usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindBoost.cmake:743 (message):
Imported targets not available for Boost version 106200
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindBoost.cmake:842 (_Boost_COMPONENT_DEPENDENCIES)
/usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/FindBoost.cmake:1395 (_Boost_MISSING_DEPENDENCIES)
python/CMakeLists.txt:2 (find_package)
-- Boost version: 1.62.0
-- Found the following Boost libraries:
-- python
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.10")
-- Found PythonInterp: /Users/hilman_dayo/.virtualenvs/cv/bin/python2.7 (found version "2.7.12")
-- Found NumPy: version "1.11.1" /Users/hilman_dayo/.virtualenvs/cv/lib/python2.7/site-packages/numpy/core/include
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
pyopengv
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /Users/hilman_dayo/opengv/build
OK. Comment by #usr1234567 give me a hint to find the answer. After a quick search, all I need to do is just execute this on the command line:
xcode-select --install

cocos2d-x 3.6 error: Error running command, return code: 1

I have a problem with cocos2d-x 3.6, I installed the program and create my first hello world file found in the program, but when I try to run, I get the following error, someone could tell me how to fix it and explain why it happened the error
cocos run -s ~/MyCompany2/MyGame -p linux
Running command: compile
Building mode: debug
running: 'cmake -DCMAKE_BUILD_TYPE=Debug -DDEBUG_MODE=ON ..'
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
It appears you are builing natively for Linux with GCC
-- OpenGL include dirs: /usr/include
-- GLEW include dirs: /usr/include
-- PkgConfig found
-- checking for module 'glfw3'
-- package 'glfw3' not found
CMake Error at cocos2d/cmake/Modules/FindPackageHandleStandardArgs.cmake:136
(message):
Could NOT find GLFW3 (missing: GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
Call Stack (most recent call first):
cocos2d/cmake/Modules/FindPackageHandleStandardArgs.cmake:343
(_FPHSA_FAILURE_MESSAGE)
cocos2d/cmake/Modules/FindGLFW3.cmake:152
(find_package_handle_standard_args)
cocos2d/cmake/Modules/CocosBuildHelpers.cmake:44 (find_package)
cocos2d/CMakeLists.txt:187 (cocos_find_package)
-- Configuring incomplete, errors occurred!
See also "/home/jmuniz/MyCompany2/MyGame/linux-build/CMakeFile/CMakeOutput.log".
Error running command, return code: 1
The way to read errors in your build chain is typically from the top down; find the first thing marked "error" and fix that.
In this case, the first error is:
CMake Error at cocos2d/cmake/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find GLFW3 (missing: GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
and right above it the very helpful:
-- package 'glfw3' not found
So, it seems that what you're building requires this glfw3, and it can't find it.
I'm guessing that it's this: http://www.glfw.org/
You should check that you have that. If you don't, download it and install it appropriately for your system (which may, depending on what OS you're running, be as easy as finding it in your package manager), and try again.