CMake错误:无法创建名为CodeLite - Unix Makefiles的生成器。

4
使用Ubuntu LTS 14.04。 尝试按照此教程TheChernoProject 如何在Linux上设置C++开发环境来安装codelite进行C++开发。
CMakeLists.txt:
cmake_minimum_required (VERSION 3.5)

project (HelloWorld)

set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++14")
set (source_dir "${PROJECT_SOURCE_DIR}/src/")

file (GLOB source_files "${source_dir}/*.cpp")

add_executable (HelloWorld ${source_files})

build.sh:

#!/bin/sh

cmake -G "CodeLite - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

编辑: 在查阅文档https://github.com/eranif/codelite后,我修改了build.sh如下:

cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug

它起作用了。并且给出了输出:

-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- Configuring done
-- Generating done

然而,HelloWorld工作区未生成。

{btsdaf} - Sean Burton
{btsdaf} - Ahmed
我遇到了相同的错误。运行的是Linux Mint 18.3。 - ES3178
1个回答

2

我完全使用CodeLite从头开始创建了一个新项目,并由它为我生成了CMake文件。一切都很顺利。


由于某些原因,每当我尝试创建一个新项目时,codelite都会崩溃。 - Ahmed
1
啊!我为你找到了这个链接:https://dev59.com/PITba4cB1Zd3GeqP9KhT - ES3178
这正是我所需要的。创建工作区并新建项目后,一切都按预期构建和运行。 - Ahmed

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接