utcs-scea / altis

A benchmarking suite for heterogeneous systems. The primary goal of this project is to improve and update aspects of existing benchmarking suites which are either insufficient or outdated.
https://utcs-scea.github.io/altis/
BSD 2-Clause "Simplified" License
37 stars 14 forks source link

error: ‘stoi’ is not a member of ‘std’ #18

Closed Dazhuzhu-github closed 2 years ago

Dazhuzhu-github commented 2 years ago

My enviroment is win11, wsl2, g++,gcc 4.4.7 I met the problem :

deviceQuery.cpp: In function ‘int main(int, char)’: deviceQuery.cpp:176: error: ‘stoi’ is not a member of ‘std’ deviceQuery.cpp:180: error: no matching function for call to ‘std::basic_fstream<char, std::char_traits >::open(std::string&, std::_Ios_Openmode)’ /usr/include/c++/4.4/fstream:865: note: candidates are: void std::basic_fstream<_CharT, _Traits>::open(const char, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits] make: [Makefile:326: deviceQuery.o] Error 1 Failed to compile deviceQuery

I try the solution on stackoverflow but don't work https://stackoverflow.com/questions/38034197/compile-error-stoi-is-not-a-member-of-std

Dazhuzhu-github commented 2 years ago

sorry, I solve the problem. My version of gcc and g++ are too old. the version should be over 4.8 to support the c++11