简体   繁体   English

C ++ 0x编译器支持问题

[英]C++0x compiler support issue

Trying to install pdf2htmlEX on Ubuntu 14.04 but getting stuck with this error 尝试在Ubuntu 14.04上安装pdf2htmlEX ,但由于此错误而卡住

Error: your compiler does not support C++0x, please update it. 错误:您的编译器不支持C ++ 0x,请对其进行更新。

Checked my version of both gcc & g++ 检查了我的gcc和g ++版本

gcc (Ubuntu 4.9.1-3ubuntu2~14.04.1) 4.9.1 gcc(Ubuntu 4.9.1-3ubuntu2〜14.04.1)4.9.1

g++ (Ubuntu 4.9.1-3ubuntu2~14.04.1) 4.9.1 g ++(Ubuntu 4.9.1-3ubuntu2〜14.04.1)4.9.1

Which should be ok for C++0x support. 对于C ++ 0x支持应该可以。 Also added a symbolic links for cc & c++. 还为cc和c ++添加了符号链接。 What am I missing here? 我在这里想念什么? Doesn't 4.9.1 support C++0x? 4.9.1不支持C ++ 0x吗?

EDIT: 编辑:

Error occurs when I'm trying to make the app using cmake .. here's what I can find in the CMakeLists.txt 当我尝试使用cmake制作应用程序时发生错误。这是我在CMakeLists.txt中可以找到的内容

# CYGWIN or GCC 4.5.x bug
if(CYGWIN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

>include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("${CMAKE_CXX_FLAGS}" CXX0X_SUPPORT)
if(NOT CXX0X_SUPPORT)
    message(FATAL_ERROR "Error: your compiler does not support C++0x, please update it.")
endif()

Ok so it looks like ${CMAKE_CXX_FLAGS} was including 好的,看起来$ {CMAKE_CXX_FLAGS}包括

-stdlib=libc++ -stdlib = libc ++

According to this post When is it necessary to use use the flag -stdlib=libstdc++? 根据这篇文章, 何时需要使用标志-stdlib = libstdc ++? it's not necessary, so removed it seemed to solve the issue 没必要,因此将其删除似乎可以解决问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM