How to build MTFMapper

来源:互联网 发布:彩票开奖源码 编辑:程序博客网 时间:2024/05/18 09:20

MTFMapper
Requires

OpenCV

  • remove FindOpenCV.cmake from cmake_helpers folder (e.g. copy to somewhere else)
  • automatically found 3.1.0.
  • See “自动”检测OpenCV ?!! in Build OpenCV 3.1 from source files on Windows

TCLAP (Templatized C++ Command Line Parser Library)

  • Manually add include path $home\\tclap-1.2.1\\include\\ to FindTCLAP.cmake

Eigen3

  • Downloaded version 3.3.4
  • Ended up manually set EIGEN3_INCLUDE_DIR to $home\\\Downloads\\eigen-eigen-5a0156e40feb
  • Before, Tried to use CMake to build
The C compiler identification is MSVC 18.0.40629.0The CXX compiler identification is MSVC 18.0.40629.0Check for working C compiler using: Visual Studio 12 2013 Win64Check for working C compiler using: Visual Studio 12 2013 Win64 -- worksDetecting C compiler ABI infoDetecting C compiler ABI info - doneCheck for working CXX compiler using: Visual Studio 12 2013 Win64Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- worksDetecting CXX compiler ABI infoDetecting CXX compiler ABI info - doneDetecting CXX compile featuresDetecting CXX compile features - donePerforming Test standard_math_library_linked_to_automaticallyPerforming Test standard_math_library_linked_to_automatically - SuccessStandard libraries to link to explicitly: nonePerforming Test COMPILER_SUPPORT_OPENMPPerforming Test COMPILER_SUPPORT_OPENMP - SuccessPerforming Test EIGEN_COMPILER_SUPPORT_CPP11Performing Test EIGEN_COMPILER_SUPPORT_CPP11 - FailedFound unsuitable Qt version "5.9.1" from C:/Qt/Qt5.9.1/5.9.1/msvc2013_64/bin/qmake.exePerforming Test EIGEN_COMPILER_SUPPORT_CXX11Performing Test EIGEN_COMPILER_SUPPORT_CXX11 - FailedThe Fortran compiler identification is unknownA cache variable, namely BLAS_DIR, has been set to specify the install directory of BLASLooking for BLAS -- mkl.h not foundLooking for include file pthread.hLooking for include file pthread.h - not foundFound Threads: TRUE  Looking for MKL BLAS: not foundLooking for Goto BLAS: not foundLooking for Open BLAS: not foundLooking for Eigen BLAS: not foundLooking for Eigen BLAS: not foundLooking for Atlas BLAS: not foundLooking for PhiPACK BLAS: not foundLooking for CXML BLAS: not foundLooking for DXML BLAS: not foundLooking for SunPerf BLAS: not foundLooking for SCSL BLAS: not foundLooking for SGIMATH BLAS: not foundLooking for IBM ESSL BLAS: not foundLooking for IBM ESSL MT BLAS: not foundLooking for ACML BLAS: not foundLooking for ACML BLAS: not foundLooking for ACML BLAS: not foundLooking for Apple BLAS: not foundLooking for NAS BLAS: not foundLooking for Generic BLAS: not foundLooking for Generic BLAS: not foundLooking for Generic BLAS: not foundLooking for Generic BLAS: not foundLooking for Generic BLAS: not foundCMake Warning at cmake/FindBLAS.cmake:1371 (message):  BLA_VENDOR has been set to All but blas libraries could not be found or  check of symbols failed.  Please indicate where to find blas libraries.  You have three options:  - Option 1: Provide the installation directory of BLAS library with cmake  option: -DBLAS_DIR=your/path/to/blas  - Option 2: Provide the directory where to find BLAS libraries with cmake  option: -DBLAS_LIBDIR=your/path/to/blas/libs  - Option 3: Update your environment variable (Linux: LD_LIBRARY_PATH,  Windows: LIB, Mac: DYLD_LIBRARY_PATH)  To follow libraries detection more precisely you can activate a verbose  mode with -DBLAS_VERBOSE=ON at cmake configure.  You could also specify a BLAS vendor to look for by setting  -DBLA_VENDOR=blas_vendor_name.  List of possible BLAS vendor: Goto, ATLAS PhiPACK, CXML, DXML, SunPerf,  SCSL, SGIMATH, IBMESSL, Intel10_32 (intel mkl v10 32 bit),Intel10_64lp  (intel mkl v10 64 bit, lp thread model, lp64 model), Intel10_64lp_seq  (intel mkl v10 64 bit, sequential code, lp64 model),Intel( older versions  of mkl 32 and 64 bit), ACML, ACML_MP, ACML_GPU, Apple, NAS, GenericCall Stack (most recent call first):  cmake/FindLAPACK.cmake:138 (find_package)  test/CMakeLists.txt:30 (find_package)A library with BLAS API not found. Please specify library location.LAPACK requires BLAS.Could NOT find CHOLMOD (missing:  CHOLMOD_INCLUDES CHOLMOD_LIBRARIES) Could NOT find UMFPACK (missing:  UMFPACK_INCLUDES UMFPACK_LIBRARIES) Could NOT find SUPERLU (missing:  SUPERLU_INCLUDES SUPERLU_LIBRARIES SUPERLU_VERSION_OK) Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) Could NOT find BLAS (missing:  BLAS_SEQ_LIBRARIES BLAS_LIBRARY_DIRS) Performing Test SCOTCH_Num_4Performing Test SCOTCH_Num_4 - FailedPerforming Test SCOTCH_Num_8Performing Test SCOTCH_Num_8 - FailedCould NOT find MPI_C (missing:  MPI_C_LIBRARIES MPI_C_INCLUDE_PATH) Could NOT find MPI_CXX (missing:  MPI_CXX_LIBRARIES MPI_CXX_INCLUDE_PATH) Performing Test PTSCOTCH_Num_4Performing Test PTSCOTCH_Num_4 - FailedPerforming Test PTSCOTCH_Num_8Performing Test PTSCOTCH_Num_8 - FailedA version of Pastix has been found but pastix_nompi.h does not exist in the include directory. Because Eigen tests require a version without MPI, we disable the Pastix backend.Could NOT find SPQR (missing:  SPQR_INCLUDES SPQR_LIBRARIES) Found unsuitable Qt version "5.9.1" from C:/Qt/Qt5.9.1/5.9.1/msvc2013_64/bin/qmake.exePerforming Test COMPILER_SUPPORT_FASTMATHPerforming Test COMPILER_SUPPORT_FASTMATH - FailedPerforming Test COMPILER_SUPPORT_FPFASTPerforming Test COMPILER_SUPPORT_FPFAST - SuccessCould NOT find BoostCould NOT find GOOGLEHASH (missing:  GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE) Could NOT find ADOLC (missing:  ADOLC_INCLUDES ADOLC_LIBRARIES) Could NOT find MPFR (missing:  MPFR_INCLUDES MPFR_LIBRARIES MPFR_VERSION_OK) (Required is at least version "2.3.0")Could NOT find GMP (missing:  GMP_INCLUDES GMP_LIBRARIES) Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) Could NOT find FFTW (missing:  FFTW_INCLUDES FFTW_LIBRARIES) Found OpenGL: opengl32  Could NOT find GLUT (missing:  GLUT_glut_LIBRARY GLUT_INCLUDE_DIR) CMake Warning (dev) at unsupported/test/CMakeLists.txt:121 (if):  Policy CMP0054 is not set: Only interpret if() arguments as variables or  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy  details.  Use the cmake_policy command to set the policy and suppress this  warning.  Quoted variables like "MSVC" will no longer be dereferenced when the policy  is set to NEW.  Since the policy is not set the OLD behavior will be used.This warning is for project developers.  Use -Wno-dev to suppress it.Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v7.0 (found suitable version "7.0", minimum required is "7.0") Found unsuitable Qt version "5.9.1" from C:/Qt/Qt5.9.1/5.9.1/msvc2013_64/bin/qmake.exeQt4 not found, so disabling the mandelbrot and opengl demos***************************************************************    Eigen's unit tests configuration summary          ***************************************************************Build type:        ReleaseBuild site:        z230-longzhenBuild string:      unknownwin-18.0.40629.0-sse2-64bitEnabled backends:  Disabled backends: Cholmod,  UmfPack,  SuperLU,  PaStiX,  METIS,  SPQR,  Qt4 support,  Boost.Multiprecision,  GoogleHash,  Adolc,  MPFR C++,  fftw,  OpenGL, Default order:     Column-majorMaximal matrix/vector size: 320SSE2:              Using architecture defaultsSSE3:              Using architecture defaultsSSSE3:             Using architecture defaultsSSE4.1:            Using architecture defaultsSSE4.2:            Using architecture defaultsAVX:               Using architecture defaultsFMA:               Using architecture defaultsAVX512:            Using architecture defaultsAltivec:           Using architecture defaultsVSX:               Using architecture defaultsARM NEON:          Using architecture defaultsARMv8 NEON:        Using architecture defaultsS390X ZVECTOR:     Using architecture defaultsC++11:             OFFSYCL:              OFFCUDA:              OFFCXX:               C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.exe CXX_FLAGS:          /DWIN32 /D_WINDOWS /W4 /GR /EHsc /EHsc /wd4127 /wd4505 /wd4714 /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS Sparse lib flags:   ************************************************************Configured Eigen 3.3.4To build/run the unit tests, read this page:  http://eigen.tuxfamily.org/index.php?title=TestsConfiguring done

QT

  • Now back to MTFMapper, complaining about qt
CMake Warning at C:/Qt/Qt5.5.0/5.5/msvc2013/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:325 (find_package):  Could not find a package configuration file provided by "Qt5Charts" with  any of the following names:    Qt5ChartsConfig.cmake    qt5charts-config.cmake
  • Because of the older QT version 5.5 installed by other people…

CMake warnings with Qt5 charts #328

  • Btw: i think Qt Charts are in Qt >= 5.6

Problem installing Qt Charts

  • Hi! Qt Charts is now part of the official release, just update to Qt 5.7.

Solution

  • Downloaded Qt 5.9.1 for Windows (2.3 GB)
  • Installed 5.9.1
  • Change PATH to C:\Qt\Qt5.9.1\5.9.1\msvc2013_64\bin

How to find Qt?

  • There is single CMakeLists.txt under $home\mtfmapper-code\bin\ which is used to build GUI using Qt libraries
  • find_package(Qt5Widgets) SOMEHOW, use PATH to locate C:/Qt/Qt5.9.1/5.9.1/msvc2013_64/bin/Qt5Widgets.dll, then to work out the location C:\Qt\Qt5.9.1\5.9.1\msvc2013_64\lib\cmake\ for Qt5ChartsConfig.cmake, Qt5WidgetsConfig.cmake, Qt5CoreConfig.cmake etc.

Mistake

  • Made mistake to change PATH to C:\Qt\Qt5.9.1\5.9.1\msvc2013\bin (no 64)
  • End up finding C:\Program Files\Anaconda3\Library\lib\cmake\ instead

* ‘M_PI’ : undeclared identifier *

  • Error 1 error C2065: ‘M_PI’ : undeclared identifier
  • M_PI flagged as undeclared identifier

Math Constants are not defined in Standard C/C++. To use them, you must first define _USE_MATH_DEFINES and then include cmath or math.h.

Dear Eunsu,if you go inside the head file <math.h> inside "Exsternal Dependencies" of Visual Studio 2013, you can see that this is part of the code: '#if defined (_USE_MATH_DEFINES) && !defined (_MATH_DEFINES_DEFINED) /* **** / #define M_PI 3.14159265358979323846 / **** */ #endif' If you want to use this #define M_PI you MUST define _USE_MATH_DEFINES with an #define. This is the reason!

  • In CMakeLists.txt, add add_definitions(-D_USE_MATH_DEFINES)
原创粉丝点击