简体   繁体   中英

C++0x compiler support issue

Trying to install pdf2htmlEX on Ubuntu 14.04 but getting stuck with this error

Error: your compiler does not support C++0x, please update it.

Checked my version of both gcc & g++

gcc (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. Also added a symbolic links for cc & c++. What am I missing here? Doesn't 4.9.1 support 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

# 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

-stdlib=libc++

According to this post When is it necessary to use use the flag -stdlib=libstdc++? it's not necessary, so removed it seemed to solve the issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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