I am using OSX Yosemite. My code gives me following error when using ordered_map :
rnsgq.cpp:12:7: error: no member named 'unordered_map' in namespace 'std'
std::unordered_map<int,std::vector<RNSGQ::Point>> id_location_map;
I am using the following g++ :
mythlabs:RNSGQImpl myth$ g++ -v
Using built-in specs.
COLLECT_GCC=g++-4.7
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc47/4.7.4/libexec/gcc/x86_64-apple-darwin14.0.0/4.7.4/lto-wrapper
Target: x86_64-apple-darwin14.0.0
Configured with: ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gcc47/4.7.4 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.7 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-ppl=/usr/local/opt/ppl011 --with-cloog=/usr/local/opt/cloog-ppl015 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc47 4.7.4' --with-bugurl=http://ift.tt/1kyoNsj --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.7.4 (Homebrew gcc47 4.7.4)
I have a makefile defined as :
CFLAGS= -O1
SFLAGS= -ldl -lpthread
%.o: %.c
gcc -c $(CFLAGS) $< -o $@
rnsgq : rnsgq.cpp sqlite3.o
g++ -std=c++11 -stdlib=libstdc++ -g -Wall $(SFLAGS) -o rnsgq.out rnsgq.cpp sqlite3.o
shell : sqlite3.o
gcc $(SFLAGS) -o shell.out shell.c sqlite3.o
.Phony: clean all
clean:
rm -rf *.o rnsgq shell *.dSYM
all: rnsgq .shell
I even tried :
g++ -std=c++11 -stdlib=libc++ ...
and simple..
g++ -std=c++11 ...
Where am I going wrong?
Aucun commentaire:
Enregistrer un commentaire