Home › Forums › Software Development › error C2039: 'function' : is not a member of 'std' (Visual C++ 6.0) › Reply To: error C2039: 'function' : is not a member of 'std' (Visual C++ 6.0)
std::function was introduced in C++11 which is not supported in Visual C++ 6.0.
We have a handful of C++ helper functions baked into the C headers that require C++11. They are defined whenever the ‘__cplusplus’ flag is defined and are needed for the EyeX C++ bindings (include/eyex-cpp/EyeX.hpp and related classes).
A few suggestions on how to work around this (none is optimal):
– If you are using the C API (EyeX.h) rather than the C++ bindings, you could try and search the C header files for the string “#if defined(__cplusplus)” and remove anything that requires C++11 and related code until it compiles.
– Another way, if you are using the C API only, might be to temporarily undefine the ‘__cplusplus’ flag when including the EyeX C headers, and then define it again.
– A third option is to upgrade to a newer Visual Studio version that has support for the required C++11 features.
I will also file a feature request to the EyeX Engine team to remove this C++11 dependency so that it is not required when using the pure C API from C++. I cannot promise that the request will be accepted, but I really think it should be possible to use the C API from C++ that way.