BamUtil: FAQ
From Genome Analysis Wiki
Jump to navigationJump to search
Compile Problems
HashErrorModel.cpp:96: error: ‘class std::unordered_map, std::equal_to, std::allocator > >’ has no member named ‘at’
- Error:
HashErrorModel.cpp: In member function ‘uint8_t HashErrorModel::getQemp(BaseData&)’: HashErrorModel.cpp:96: error: ‘class std::unordered_map, std::equal_to, std::allocator > >’ has no member named ‘at’ make[2]: *** [../obj/HashErrorModel.o] Error 1
- HashErrorModel by default uses an unordered_map which is only found in C++11/C++0x.
- The code attempts to automatically detect whether or not you have C++11/C++0x by checking if the CCVERSION > X4.3.0.
- If you see this failure, that means this check did not properly work for you. You will need to manually disable the C++11/C++0x code. There are a couple of ways to do this:
- Update bamUtil/Makefile.inc, line 7, change
CXX11_AVAIL ?= 1
toCXX11_AVAIL = 0
- Set CXX11_AVAIL to 0 on the command line:
make CXX11_AVAIL=0
- Set CXX11_AVAIL = 0 in your environment
By making one of these changes, the code should compile and use map instead of unordered_map.