c++ - issue with unordered_map on mac -


i want compile c++ source code found. code works on linux (qt), on mac os x (10.9.5) have error on qt :

/users/anass/test2/segmenter.h:19: erreur : 'unordered_map' file not     found #include <unordered_map>          ^ 

and when replace the

"#include <unordered_map>" "#include<tr1/unordered_map>"  

the line underlined green , error change line :

/users/anass/test2/segmenter.h:21: erreur : 'unordered_set' file not     found #include <unordered_set>          ^ 

i kept same .pro file (defined linux) :

qt       += core gui opengl greaterthan(qt_major_version, 4): qt += widgets  target = superfacets config   += console config   -= app_bundle  template = app  qmake_cxxflags_release += -fpermissive qmake_cxxflags_debug += -fpermissive qmake_cxxflags += -std=c++0x qmake_cxxflags_release -= -o2 qmake_cxxflags_release += -o3   sources += main.cpp \ vertex3d.cpp \ vertex2d.cpp \ triangle.cpp \ timer.cpp \ segmenter.cpp \ reader.cpp \ normals.cpp \ meshvisualizer.cpp \ edge.cpp \ dialogs.cpp \ colormapper.cpp  headers += \ vertex3d.h \ vertex2d.h \ triangle.h \ timer.h \ sorting.h \ segmenter.h \ reader.h \ normals.h \ meshvisualizer.h \ mesh.h \ edge.h \ dialogs.h \ colormapper.h   libs += -lglu 

the clang version :

clang --version apple llvm version 6.0 (clang-600.0.57) (based on llvm 3.5svn) target: x86_64-apple-darwin13.4.0 thread model: posix 

i searched on google , found related "stdlib" i'm specialist of compiling.

any please?

a quick google reveals this fix. add

qmake_macosx_deployment_target = 10.7 

to .pro file along aforementioned

qmake_cxxflags += -std=c++11 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -