c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -DNDEBUG -c src/dictionary.cc In file included from src/dictionary.cc:9: src/dictionary.h:89: error: ‘nullptr’ was not declared in this scope src/dictionary.cc: In member function ‘const std::vector<int, std::allocator<int> > fasttext::Dictionary::getSubwords(const std::string&) const’: src/dictionary.cc:99: error: the default argument for parameter 2 of ‘void fasttext::Dictionary::computeSubwords(const std::string&, std::vector<int, std::allocator<int> >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) const’ has not yet been parsed src/dictionary.cc: In member function ‘void fasttext::Dictionary::initNgrams()’: src/dictionary.cc:203: error: the default argument for parameter 2 of ‘void fasttext::Dictionary::computeSubwords(const std::string&, std::vector<int, std::allocator<int> >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) const’ has not yet been parsed src/dictionary.cc: In member function ‘void fasttext::Dictionary::threshold(int64_t, int64_t)’: src/dictionary.cc:262: error: expected primary-expression before ‘[’ token src/dictionary.cc:262: error: expected primary-expression before ‘]’ token src/dictionary.cc:262: error: expected primary-expression before ‘const’ src/dictionary.cc:262: error: expected primary-expression before ‘const’ src/dictionary.cc:272: error: expected primary-expression before ‘[’ token src/dictionary.cc:272: error: expected primary-expression before ‘]’ token src/dictionary.cc:272: error: expected primary-expression before ‘const’ src/dictionary.cc:277: error: ‘class std::vector<fasttext::entry, std::allocator<fasttext::entry> >’ has no member named ‘shrink_to_fit’ src/dictionary.cc: In member function ‘std::vector<long int, std::allocator<long int> > fasttext::Dictionary::getCounts(fasttext::entry_type) const’: src/dictionary.cc:304: error: expected initializer before ‘:’ token src/dictionary.cc:540: error: expected primary-expression at end of input src/dictionary.cc:540: error: expected ‘;’ at end of input src/dictionary.cc:540: error: expected primary-expression at end of input src/dictionary.cc:540: error: expected ‘)’ at end of input src/dictionary.cc:540: error: expected statement at end of input src/dictionary.cc:540: error: expected ‘}’ at end of input src/dictionary.cc: At global scope: src/dictionary.cc:540: error: expected ‘}’ at end of input make: *** [dictionary.o] Error 1
gcc -v
gcc -v
Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
when use make command error message:
c++ -pthread -std=c++0x -march=native -O3 -funroll-loops -DNDEBUG -c src/dictionary.cc In file included from src/dictionary.cc:9: src/dictionary.h:89: error: ‘nullptr’ was not declared in this scope src/dictionary.cc: In member function ‘const std::vector<int, std::allocator<int> > fasttext::Dictionary::getSubwords(const std::string&) const’: src/dictionary.cc:99: error: the default argument for parameter 2 of ‘void fasttext::Dictionary::computeSubwords(const std::string&, std::vector<int, std::allocator<int> >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) const’ has not yet been parsed src/dictionary.cc: In member function ‘void fasttext::Dictionary::initNgrams()’: src/dictionary.cc:203: error: the default argument for parameter 2 of ‘void fasttext::Dictionary::computeSubwords(const std::string&, std::vector<int, std::allocator<int> >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >*) const’ has not yet been parsed src/dictionary.cc: In member function ‘void fasttext::Dictionary::threshold(int64_t, int64_t)’: src/dictionary.cc:262: error: expected primary-expression before ‘[’ token src/dictionary.cc:262: error: expected primary-expression before ‘]’ token src/dictionary.cc:262: error: expected primary-expression before ‘const’ src/dictionary.cc:262: error: expected primary-expression before ‘const’ src/dictionary.cc:272: error: expected primary-expression before ‘[’ token src/dictionary.cc:272: error: expected primary-expression before ‘]’ token src/dictionary.cc:272: error: expected primary-expression before ‘const’ src/dictionary.cc:277: error: ‘class std::vector<fasttext::entry, std::allocator<fasttext::entry> >’ has no member named ‘shrink_to_fit’ src/dictionary.cc: In member function ‘std::vector<long int, std::allocator<long int> > fasttext::Dictionary::getCounts(fasttext::entry_type) const’: src/dictionary.cc:304: error: expected initializer before ‘:’ token src/dictionary.cc:540: error: expected primary-expression at end of input src/dictionary.cc:540: error: expected ‘;’ at end of input src/dictionary.cc:540: error: expected primary-expression at end of input src/dictionary.cc:540: error: expected ‘)’ at end of input src/dictionary.cc:540: error: expected statement at end of input src/dictionary.cc:540: error: expected ‘}’ at end of input src/dictionary.cc: At global scope: src/dictionary.cc:540: error: expected ‘}’ at end of input make: *** [dictionary.o] Error 1