CXX object CMakeFiles/CxxTest.dir/main.cpp.o
[ 50%] Building CXX object CMakeFiles/CxxTest.dir/TestClass.cpp.o
[ 75%] Linking CXX executable CxxTest
CMakeFiles/CxxTest.dir/TestClass.cpp.o: In function `TestClass::~TestClass()':
/home/yuriy/Projects/CLionProjects/CxxTest/cmake-build-debug/TestClass.cpp:15: multiple definition of `main'
CMakeFiles/CxxTest.dir/main.cpp.o:/home/yuriy/Projects/CLionProjects/CxxTest/main.cpp:4: first defined here
collect2: error: ld returned 1 exit status
CMakeFiles/CxxTest.dir/build.make:103: recipe for target 'CxxTest' failed
make[3]: *** [CxxTest] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/CxxTest.dir/all' failed
make[2]: *** [CMakeFiles/CxxTest.dir/all] Error 2
CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/CxxTest.dir/rule' failed
make[1]: *** [CMakeFiles/CxxTest.dir/rule] Error 2
Makefile:129: recipe for target 'CxxTest' failed
make: *** [CxxTest] Error 2
так что ли?
у вас дублируется main
Обсуждают сегодня