STL library compilation error: ‘__glibcxx_requires_valid_range’ was not declared in this scope
Problem
In file included from /opt/STM/STLinux-2.3/devkit/sh4/target/usr/include/c++/4.2.4/bits/char_traits.h:46,
from /opt/STM/STLinux-2.3/devkit/sh4/target/usr/include/c++/4.2.4/string:47,
from /opt/STM/STLinux-2.3/devkit/sh4/target/usr/include/c++/4.2.4/bits/locale_classes.h:47,
from /opt/STM/STLinux-2.3/devkit/sh4/target/usr/include/c++/4.2.4/locale:44,
from ../vfcommon/vfstring.h:39,
from ../vfinclude/vfcommon.h:24,
from vfrpc2.cpp:20:
/opt/STM/STLinux-2.3/devkit/sh4/target/usr/include/c++/4.2.4/bits/stl_algobase.h: In function ‘void std::fill(unsigned char*, unsigned char*, const unsigned char&)’:
/opt/STM/STLinux-2.3/devkit/sh4/target/usr/include/c++/4.2.4/bits/stl_algobase.h:598: error: ‘__glibcxx_requires_valid_range’ was not declared in this scope
Solution
You have a file called debug.h in your project that shadows the system header file. Rename your debug.h to something else and the error will be gone!
Yes... Thank you! I did rename and the error vanished! I killed about 3-4 hours on this, your post is most appreciated!