C++ g++;5.1.0未构建项目,叮当声显示未知错误

C++ g++;5.1.0未构建项目,叮当声显示未知错误,c++,unit-testing,c++11,biicode,C++,Unit Testing,C++11,Biicode,我正在尝试使用biicode构建一个简单的项目,包括catch-cpp单元测试库。现在我有一个简单的香草项目,没有额外的声明,看起来像 #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "cbs-algorithm-sort.hpp" int returnInt(int n){ return n; }; TEST_CASE( "Sample test", "[Sample Test]" ) { REQUIRE( retu

我正在尝试使用biicode构建一个简单的项目,包括catch-cpp单元测试库。现在我有一个简单的香草项目,没有额外的声明,看起来像

#define CATCH_CONFIG_MAIN 
#include "catch.hpp"
#include "cbs-algorithm-sort.hpp"

int returnInt(int n){ return n; };

TEST_CASE( "Sample test", "[Sample Test]" ) {
    REQUIRE( returnInt(1) == 1 );
    REQUIRE( returnInt(2) == 2 );
    REQUIRE( returnInt(3) == 6 );
    REQUIRE( returnInt(10) == 3628800 );
}
使用g++5.1.0进行构建时,会显示以下错误,并且永远不会生成project:

INFO: Processing changes...
INFO: Saving files from: florianwolters/catch
Running: "cmake"  -G "Unix Makefiles" -Wno-dev  ../cmake
-- The C compiler identification is GNU 5.1.0
-- The CXX compiler identification is GNU 5.1.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

        BLOCK: florianwolters/catch 
-----------------------------------------------------------
+ LIB: florianwolters_catch
-- Writing default cmake_dummy.cpp for building library
+ EXE: florianwolters_catch_projects_SelfTest_TestMain
+ EXE: florianwolters_catch_projects_SelfTest_ToStringWhich

        BLOCK: agauniyal/cbs-algorithm-sort 
-----------------------------------------------------------
+ LIB: agauniyal_cbs-algorithm-sort
+ EXE: agauniyal_cbs-algorithm-sort_unit_test
-- Initializing variables to create tests with CTest
-- Added custom target for all the tests: 
-- Following targets are defined like tests (excluded from build)
+ TEST: agauniyal_cbs-algorithm-sort_unit_test
-- Configuring done
-- Generating done
-- Build files have been written to: /home/agauniyal/projects/cbs-algorithm-sort/bii/build
Building: "cmake" --build . 
Scanning dependencies of target florianwolters_catch
[ 20%] Building CXX object florianwolters_catch/CMakeFiles/florianwolters_catch.dir/projects/SelfTest/TestMain.cpp.o
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_impl.hpp:19:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:47,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:73:9: error: invalid suffix "f5615272b0fb51bcd7a669e68f3b4c7a87d93bb" on integer constant
 >>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
         ^
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_expression_lhs.hpp:12:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_result_builder.h:91,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_capture.hpp:11,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:28,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:43:17: error: ‘nullptr_t’ in namespace ‘std’ does not name a type
     inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; }
                 ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:58: error: ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare’ conflicts with a previous declaration
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                                          ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:159:44: note: previous declaration ‘namespace Catch::Internal { }::compare’
     template<Operator Op, typename T> bool compare( T* lhs, int rhs ) {
                                            ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:53: error: ‘nullptr_t’ is not a member of ‘std’
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                                     ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:70: error: expected primary-expression before ‘*’ token
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                                                      ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:72: error: ‘rhs’ was not declared in this scope
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                                                        ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:76: error: expression list treated as compound expression in initializer [-fpermissive]
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                                                            ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:44: warning: variable templates only available with -std=c++14 or -std=gnu++14
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                            ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:165:78: error: expected ‘;’ before ‘{’ token
     template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) {
                                                                              ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:168:66: error: ‘std::nullptr_t’ has not been declared
     template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) {
                                                                  ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:168:44: error: redefinition of ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare(T*, int)’
     template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) {
                                            ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_evaluate.hpp:159:44: note: ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare(T*, int)’ previously declared here
     template<Operator Op, typename T> bool compare( T* lhs, int rhs ) {
                                            ^
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_expression_lhs.hpp:13:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_result_builder.h:91,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_capture.hpp:11,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:28,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.h:54:38: error: ‘std::string Catch::toString’ redeclared as different kind of symbol
 std::string toString( std::nullptr_t );
                                      ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.h:51:13: note: previous declaration ‘std::string Catch::toString(unsigned char)’
 std::string toString( unsigned char value );
             ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.h:54:23: error: ‘nullptr_t’ is not a member of ‘std’
 std::string toString( std::nullptr_t );
                       ^
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_impl.hpp:19:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:47,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp: In member function ‘Catch::Totals Catch::Runner::runTests()’:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:63:1: error: expected primary-expression before ‘<<’ token
 <<<<<<< HEAD
 ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:63:3: error: expected primary-expression before ‘<<’ token
 <<<<<<< HEAD
   ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:63:5: error: expected primary-expression before ‘<<’ token
 <<<<<<< HEAD
     ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:63:7: error: expected primary-expression before ‘<’ token
 <<<<<<< HEAD
       ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:63:9: error: ‘HEAD’ was not declared in this scope
 <<<<<<< HEAD
         ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:64:3: error: expected primary-expression before ‘==’ token
 =======
   ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:64:5: error: expected primary-expression before ‘==’ token
 =======
     ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:64:7: error: expected primary-expression before ‘=’ token
 =======
       ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:65:35: error: expected primary-expression before ‘skippedTestCases’
             std::vector<TestCase> skippedTestCases;
                                   ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:66:91: error: ‘skippedTestCases’ was not declared in this scope
             getRegistryHub().getTestCaseRegistry().getFilteredTests( testSpec, *m_config, skippedTestCases, true );
                                                                                           ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:69:27: error: name lookup of ‘itEnd’ changed for ISO ‘for’ scoping [-fpermissive]
                     it != itEnd;
                           ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:69:27: note: (if you use ‘-fpermissive’ G++ will accept your code)
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:73:1: error: expected primary-expression before ‘>>’ token
 >>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
 ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:73:3: error: expected primary-expression before ‘>>’ token
 >>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
   ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:73:5: error: expected primary-expression before ‘>>’ token
 >>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
     ^
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch_runner.hpp:73:7: error: expected primary-expression before ‘>’ token
 >>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
       ^
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_impl.hpp:35:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:47,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.hpp: At global scope:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.hpp:163:38: error: ‘std::string Catch::toString’ redeclared as different kind of symbol
 std::string toString( std::nullptr_t ) {
                                      ^
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_expression_lhs.hpp:13:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_result_builder.h:91,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_capture.hpp:11,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:28,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.h:199:13: note: previous declaration ‘template<class T, class Allocator> std::string Catch::toString(const std::vector<_Tp, _Alloc>&)’
 std::string toString( std::vector<T,Allocator> const& v ) {
             ^
In file included from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_impl.hpp:35:0,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/catch.hpp:47,
                 from /home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/projects/SelfTest/TestMain.cpp:10:
/home/agauniyal/projects/cbs-algorithm-sort/bii/deps/florianwolters/catch/include/internal/catch_tostring.hpp:163:23: error: ‘nullptr_t’ is not a member of ‘std’
 std::string toString( std::nullptr_t ) {
                       ^
florianwolters_catch/CMakeFiles/florianwolters_catch.dir/build.make:54: recipe for target 'florianwolters_catch/CMakeFiles/florianwolters_catch.dir/projects/SelfTest/TestMain.cpp.o' failed
make[2]: *** [florianwolters_catch/CMakeFiles/florianwolters_catch.dir/projects/SelfTest/TestMain.cpp.o] Error 1
CMakeFiles/Makefile2:110: recipe for target 'florianwolters_catch/CMakeFiles/florianwolters_catch.dir/all' failed
make[1]: *** [florianwolters_catch/CMakeFiles/florianwolters_catch.dir/all] Error 2
Makefile:85: recipe for target 'all' failed
make: *** [all] Error 2
ERROR: Build failed

我不知道这两个编译器产生的错误,特别是叮当一声。任何类型的帮助都足够。

您很可能有一个
git合并
,要么正在进行,要么已中止。这些:

<<<<<<< HEAD

=================

>>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
>7F5652B2B0FB51BCD7A669E68F3B4C7A87D93BB

是无法自动解决版本冲突的标记
git
位置。搜索所有发生的
您很可能有一个
git合并
,要么正在进行,要么已中止。这些:

<<<<<<< HEAD

=================

>>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
>7F5652B2B0FB51BCD7A669E68F3B4C7A87D93BB

是无法自动解决版本冲突的标记
git
位置。搜索所有发生的
您很可能有一个
git合并
,要么正在进行,要么已中止。这些:

<<<<<<< HEAD

=================

>>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
>7F5652B2B0FB51BCD7A669E68F3B4C7A87D93BB

是无法自动解决版本冲突的标记
git
位置。搜索所有发生的
您很可能有一个
git合并
,要么正在进行,要么已中止。这些:

<<<<<<< HEAD

=================

>>>>>>> 7f5615272b0fb51bcd7a669e68f3b4c7a87d93bb
>7F5652B2B0FB51BCD7A669E68F3B4C7A87D93BB


是无法自动解决版本冲突的标记
git
位置。搜索所有出现的
看起来像
catch/include/catch\u runner。hpp
有一些不同的输出,可能是部分版本控制合并或其他。我会确保您的本地库代码副本是干净且最新的。
catch\u runner.hpp
的第63行有什么内容?看起来像是合并冲突。
7f5652b2b0fb51bcd7a669e68f3b4c7a87d93bb`@antonsavinus通常,catch的单头版本问题较少,您可以在类似于
catch/include/catch\u runner的中尝试我自己的副本。hpp
中有一些不同的输出,可能是部分版本控制合并或其他。我会确保您的本地库代码副本是干净且最新的。
catch\u runner.hpp
的第63行有什么内容?看起来像是合并冲突。
7f5652b2b0fb51bcd7a669e68f3b4c7a87d93bb`@antonsavinus通常,catch的单头版本问题较少,您可以在类似于
catch/include/catch\u runner的中尝试我自己的副本。hpp
中有一些不同的输出,可能是部分版本控制合并或其他。我会确保您的本地库代码副本是干净且最新的。
catch\u runner.hpp
的第63行有什么内容?看起来像是合并冲突。
7f5652b2b0fb51bcd7a669e68f3b4c7a87d93bb`@antonsavinus通常,catch的单头版本问题较少,您可以在类似于
catch/include/catch\u runner的中尝试我自己的副本。hpp
中有一些不同的输出,可能是部分版本控制合并或其他。我会确保您的本地库代码副本是干净且最新的。
catch\u runner.hpp
的第63行有什么内容?看起来像是合并冲突。
7F5652B2B0FB51BCD7A669E68F3B4C7A87D93BB`@Antonsavinus通常,catch的单头版本问题较少,您可以在中尝试我自己的副本。是的,就是这样。但是biicode不允许我修改代码,因为每次找到它都会下载这个文件。我已经在github回购上提交了一个问题。谢谢:)我想补充一点,这确实解决了这个问题,因为它使使用clang++构建成为可能,但是g++无法生成相同的错误。您可以像这样覆盖依赖项:是的,就是这样。但是biicode不允许我修改代码,因为每次找到它都会下载这个文件。我已经在github回购上提交了一个问题。谢谢:)我想补充一点,这确实解决了这个问题,因为它使使用clang++构建成为可能,但是g++无法生成相同的错误。您可以像这样覆盖依赖项:是的,就是这样。但是biicode不允许我修改代码,因为每次找到它都会下载这个文件。我已经在github回购上提交了一个问题。谢谢:)我想补充一点,这确实解决了这个问题,因为它使使用clang++构建成为可能,但是g++无法生成相同的错误。您可以像这样覆盖依赖项:是的,就是这样。但是biicode不允许我修改代码,因为每次找到它都会下载这个文件。我已经在github回购上提交了一个问题。谢谢:)我想补充一点,这确实解决了这个问题,因为它可以使用clang++生成,但是g++无法生成,并且会出现相同的错误。您可以像这样覆盖依赖项: