CMake-Clang ++无法编译简单的测试程序Ubuntu 18.04

时间:2018-07-31 19:12:19

标签: c++ ubuntu cmake clang

我正在尝试安装PotreeConverte,其说明如下:

sudo apt-get install python-software-properties git
sudo apt-get install build-essential cmake g++
sudo apt-get install libboost-all-dev
sudo apt-get install cmake-curses-gui
sudo apt-get install gcc
--LAStools:
git clone https://github.com/m-schuetz/LAStools.git
cd LAStools/LASzip
mkdir build && cd build
**cmake -DCMAKE_BUILD_TYPE=Release ..**
make
etc..

无论如何,我被LAStools的安装困扰。当我跑步时:

cmake -DCMAKE_BUILD_TYPE=Release ..

我得到输出:

-- The CXX compiler identification is Clang 6.0.0
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:45 (message):
 The C++ compiler

"/usr/bin/clang++"

  is not able to compile a simple test program.

 It fails with the following output:

Change Dir: /home/user/LAStools/LASzip/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_4b938/fast"
/usr/bin/make -f CMakeFiles/cmTC_4b938.dir/build.make 
CMakeFiles/cmTC_4b938.dir/build
make[1]: Entering directory '/home/user/LAStools/LASzip/build/CMakeFiles/CMakeTmp'
Building CXX object 
CMakeFiles/cmTC_4b938.dir/testCXXCompiler.cxx.o
/usr/bin/clang++     -o 
CMakeFiles/cmTC_4b938.dir/testCXXCompiler.cxx.o -c /home/user/LAStools/LASzip/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_4b938
/usr/bin/cmake -E cmake_link_script 
CMakeFiles/cmTC_4b938.dir/link.txt --verbose=1
/usr/bin/clang++       -rdynamic 
CMakeFiles/cmTC_4b938.dir/testCXXCompiler.cxx.o  -o cmTC_4b938 
/usr/bin/ld: cannot find -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
CMakeFiles/cmTC_4b938.dir/build.make:97: recipe for target 'cmTC_4b938' failed
make[1]: *** [cmTC_4b938] Error 1
make[1]: Leaving directory '/home/user/LAStools/LASzip/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_4b938/fast' failed
make: *** [cmTC_4b938/fast] Error 2

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)

etc..

我检查了一下,然后有了libstdc ++。so和libstdc ++。so.6 另外,我看到了this的问题和答案,但这并没有帮助我。 在这张图片上是我拥有的编译器版本: enter image description here

0 个答案:

没有答案