まず、エラーログ:C++ CMAKE述語がないようなファイル
-- Boost version: 1.59.0
-- Success!
-- Could NOT find Freetype (missing: FREETYPE_LIBRARY) (found version "2.6.3")
-- LOADING OS --Windows--
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Gianluca/.CLion2016.2/system/cmake/generated/mcdu-57fe38f9/57fe38f9/Debug
[ 1%] Automatic moc for target untitled
[ 1%] Built target untitled_automoc
[ 2%] Building CXX object CMakeFiles/untitled.dir/main.cpp.obj
[ 3%] Building CXX object CMakeFiles/untitled.dir/mainwindow.cpp.obj
[ 4%] Building CXX object CMakeFiles/untitled.dir/gldisplay.cpp.obj
[ 7%] Building CXX object CMakeFiles/untitled.dir/svg/svg.cpp.obj
[ 7%] Building CXX object CMakeFiles/untitled.dir/svg/svgfont.cpp.obj
[ 8%] Building CXX object CMakeFiles/untitled.dir/svg/svgstring.cpp.obj
[ 11%] Building CXX object CMakeFiles/untitled.dir/ht1000scriptmanager.cpp.obj
[ 11%] Building CXX object CMakeFiles/untitled.dir/ht1000widgetfactory.cpp.obj
CMakeFiles\untitled.dir\build.make:149: recipe for target 'CMakeFiles/untitled.dir/svg/svg.cpp.obj' failed
In file included from C:\Work\PolitecProductions\mcdu\svg\svg.cpp:1:0:
C:\Work\PolitecProductions\mcdu\svg\svg.h:14:48: fatal error: boost/algorithm/string/predicate.hpp: No such file or directory
#include <boost/algorithm/string/predicate.hpp>
^
compilation terminated.
In file included from C:\Work\PolitecProductions\mcdu\svg\svgstring.cpp:3:0:
C:\Work\PolitecProductions\mcdu\svg\./svg.h:14:48: fatal error: boost/algorithm/string/predicate.hpp: No such file or directory
#include <boost/algorithm/string/predicate.hpp>
^
compilation terminated.
mingw32-make.exe[2]: *** [CMakeFiles/untitled.dir/svg/svg.cpp.obj] Error 1
mingw32-make.exe[2]: *** Waiting for unfinished jobs....
In file included from C:\Work\PolitecProductions\mcdu\svg\svgfont.cpp:2:0:
C:\Work\PolitecProductions\mcdu\svg\./svg.h:14:48: fatal error: boost/algorithm/string/predicate.hpp: No such file or directory
#include <boost/algorithm/string/predicate.hpp>
^
compilation terminated.
CMakeFiles\untitled.dir\build.make:199: recipe for target 'CMakeFiles/untitled.dir/svg/svgstring.cpp.obj' failed
mingw32-make.exe[2]: *** [CMakeFiles/untitled.dir/svg/svgstring.cpp.obj] Error 1
CMakeFiles\untitled.dir\build.make:174: recipe for target 'CMakeFiles/untitled.dir/svg/svgfont.cpp.obj' failed
mingw32-make.exe[2]: *** [CMakeFiles/untitled.dir/svg/svgfont.cpp.obj] Error 1
CMakeFiles\untitled.dir\build.make:249: recipe for target 'CMakeFiles/untitled.dir/ht1000widgetfactory.cpp.obj' failed
In file included from C:\Work\PolitecProductions\mcdu\ht1000widgetfactory.cpp:1:0:
C:\Work\PolitecProductions\mcdu\./ht1000widgetfactory.h:5:25: fatal error: QScriptEngine: No such file or directory
#include <QScriptEngine>
^
compilation terminated.
よりhttp://pastebin.com/72ySYdVd
これは、だから、下の私の実際のCMakeLists
cmake_minimum_required(VERSION 3.6)
project(mcdu)
#### Boost Check Version
find_package(Boost REQUIRED)
if(Boost_FOUND)
message(STATUS "Success!")
endif()
#### Qt5
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Script REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5OpenGL REQUIRED)
find_package(FREETYPE)
set(QT_LIBRARIES Qt5::Widgets Qt5::Core Qt5::OpenGL Qt5::Core Qt5::Script)
set(CMAKE_AUTOMOC ON)
ADD_DEFINITIONS(${QT_DEFINITIONS})
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage ")
add_definitions("-std=c++11")
# Find includes in corresponding build directories
include_directories(
${BOOST}
${FREETYPE}
${Qt5Widgets_INCLUDE_DIRS}
-lopengl32 -lglu32 -luser32
)
if (WIN32)
message(STATUS "LOADING OS --Windows--")
include_directories(
${BOOST}/lib32-msvc-14.0 -libboost_timer-vc140-mt-gd-1_59 -libboost_log-vc140-mt-gd-1_59 -libboost_log_setup-vc140-mt-gd-1_59
${FREETYPE}/objs/vc2010/Win32/ -lfreetype263d
)
endif()
#Source Files
set(SOURCE_FILES
src files. Cut to be short
#Header Files
set(HEADER_FILES
header files. Cut to be short
)
#Add Forms
QT5_WRAP_UI(FORM_FILES
.ui files
)
add_executable(untitled ${SOURCE_FILES} ${HEADER_FILES} ${FORM_FILES})
よりhttp://pastebin.com/uGf3SHUn
ですsvg.hインクルードは次のとおりです: #include <boost/algorithm/string/predicate.hpp>
私はMSVC2015とBOOST + FREETYPE envを持っています。変数がシステムAND Clionに追加されます。私がQTから構築した場合、私はpredicate.hppエラーだけを取得します。ブーストヘッダファイルへのパスを含むここ
はQT PROファイルです
QT += core gui script opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = mcdu
TEMPLATE = app
DEFINES += WIN
DEFINES += OGLFT_NO_SOLID
DEFINES += OGLFT_NO_QT
DEFINES += TEST
INCLUDEPATH += $$(BOOST)
INCLUDEPATH += $$(FREETYPE)/include
INCLUDEPATH += status
INCLUDEPATH += systems
INCLUDEPATH += svg
INCLUDEPATH += displays
CONFIG += debug
win32 {
DEFINES += WINDOWS
LIBS += -lopengl32 -lglu32 -luser32
LIBS += -L$$(BOOST)/lib32-msvc-14.0 -libboost_timer-vc140-mt-gd-1_59 -libboost_log-vc140-mt-gd-1_59 -libboost_log_setup-vc140-mt-gd-1_59
LIBS += -L$$(FREETYPE)/objs/vc2010/Win32/ -lfreetype263d
}
linux {
message("Build for Linux")
DEFINES += LINUX
DEFINES += BOOST_LOG_DYN_LINK
LIBS += -lGLU
LIBS += -lfreetype
LIBS += -L/home/RINF/rogosz/source/boost_1_59_0/stage/lib -lboost_timer -lboost_log -lboost_log_setup -lboost_system -lboost_thread -lboost_filesystem
}
SOURCES += src files: cut to be short
HEADERS += header files. cut to be short
FORMS += form files. cut to be short
リンクを含むだけではありません。エラーログ、CMakeLists、QT PROファイルを実際にあなたの質問に入れてください。 –
質問は不明確ではなく、不十分である(問題を軽減しようとする試みもなく、[minimal](http://stackoverflow.com/help/mcve)の例に近づきません)、研究努力はほとんど見られません(OPはCMakeのドキュメントを参照)。それにもかかわらず答えました。 – DevSolar
@DevSolar:なぜあなたはそのような質問に答えるのですか?あなたの答えからあなたのコメントをダウンワードして投稿するだけで十分です。 – usr1234567