Home › Forums › Software Development › error C2039: 'function' : is not a member of 'std' (Visual C++ 6.0)
Tagged: Error C2039, REX, Visual C++ 6.0
- This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by Mahi.
- AuthorPosts
- 20/08/2015 at 11:37 #3344MahiParticipant
I am using Visual C++ 6.0 as Development environment.
I have included the paths for libraries/include files.
I run here, no erros.
I have added #include <eyex\EyeX.h>
When i run, i see error C2039: ‘function’ : is not a member of ‘std’
Please let me know how to fix this.
Exact Error:
———–
——————–Configuration: eyextest – Win32 Debug——————–
Compiling…
StdAfx.cpp
Compiling…
eyextest.cpp
eyextestDlg.cpp
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(293) : error C2039: ‘function’ : is not a member of ‘std’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(293) : error C2143: syntax error : missing ‘;’ before ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(293) : error C2059: syntax error : ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(323) : error C2039: ‘function’ : is not a member of ‘std’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(323) : warning C4091: ‘typedef ‘ : ignored on left of ‘int’ when no variable is declared
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(323) : error C2143: syntax error : missing ‘;’ before ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexclienttypes.h(323) : error C2059: syntax error : ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : warning C4003: not enough actual parameters for macro ‘TX_API_FUNCTION_BASE’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : warning C4003: not enough actual parameters for macro ‘TX_PREFIX’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : error C2039: ‘ConnectionStateChangedCallback’ : is not a member of ‘Tx’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : error C2143: syntax error : missing ‘,’ before ‘&’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : error C2059: syntax error : ‘&’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : error C2039: ‘ConnectionStateChangedCallback’ : is not a member of ‘Tx’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : error C2143: syntax error : missing ‘,’ before ‘&’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexcontext.h(424) : error C2059: syntax error : ‘&’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(74) : error C2039: ‘function’ : is not a member of ‘std’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(74) : error C2143: syntax error : missing ‘)’ before ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(74) : error C2143: syntax error : missing ‘;’ before ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(74) : error C2059: syntax error : ‘;’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(74) : error C2059: syntax error : ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(74) : error C2059: syntax error : ‘)’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(103) : error C2065: ‘TElement1’ : undeclared identifier
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(104) : error C2143: syntax error : missing ‘;’ before ‘{‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(104) : error C2447: missing function header (old-style formal list?)
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(113) : error C2039: ‘function’ : is not a member of ‘std’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(113) : error C2143: syntax error : missing ‘)’ before ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(113) : error C2143: syntax error : missing ‘;’ before ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(113) : error C2059: syntax error : ‘<‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(113) : error C2059: syntax error : ‘)’
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(114) : error C2143: syntax error : missing ‘;’ before ‘{‘
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(114) : error C2447: missing function header (old-style formal list?)
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(124) : error C2954: template definitions cannot nest
c:\_sdk\tobii\tobiieyexsdk-cpp-1.5.466\include\eyex\eyexutils.h(135) : fatal error C1506: unrecoverable block scoping error
Generating Code…
Error executing cl.exe.eyextest.exe – 30 error(s), 3 warning(s)
21/08/2015 at 06:12 #3353MahiParticipantHello #konstantin, could you help if there were any settings/updates needed to make it work on VC++ 6.0?
03/09/2015 at 11:36 #3389Jenny [Tobii]ParticipantHi Mahi,
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.
26/10/2015 at 06:58 #3648MahiParticipantThank you.
- AuthorPosts
- You must be logged in to reply to this topic.