I have been struggling with this issue for a while and I would like to know a systematic way of figuring out why I might be getting this error. Apparently I have multiple components in my solution. I am getting this error when I attempt to build one of my components.
error: cannot define member function 'ImageFramework::ACE_Main::run_i' within 'ImageFramework'
In file included from C:\mingw64\required\ACE\ACE_wrappers/ace/config-all.h:89:0,
from C:\windows-libs\corba\ACE_wrappers\TAO\orbsvcs/orbsvcs/CosNamingC.h:37,
from C:\Users\UserAdmin\TreeShell\MainProcess\SourceCode\ExternalCommunication\CORBA/TCorbaClient.h:12,
from C:\Users\UserAdmin\TreeShell\MainProcess\SourceCode\ExternalCommunication/SystemCommunicator.h:23,
from C:\Users\UserAdmin\TreeShell\MainProcess\SourceCode\ApplicationManager\ApplMngExternalComm.h:18,
from C:\Users\UserAdmin\TreeShell\MainProcess\SourceCode\ApplicationManager\ApplMngMessageHandler.h:15,
from C:\Users\UserAdmin\TreeShell\MainProcess\SourceCode\ApplicationManager\ApplMngMessageHandler.cpp:15:
C:\mingw64\required\ACE\ACE_wrappers/ace/OS_main.h:218:51: error: cannot define member function 'ImageFramework::ACE_Main::run_i' within 'ImageFramework'
inline int ACE_Main::run_i (int argc, char *argv[]) \
A little background the component uses an external library called ace and the error lands me in an ace source file (which i am hesitant to touch as its not a part of my project). Which is something like this
# define main \
ace_main_i (int, char *[]); \
ACE_BEGIN_VERSIONED_NAMESPACE_DECL \
ACE_Export int ace_os_main_i (ACE_Main_Base&, int, char *[]); \
class ACE_Main : public ACE_Main_Base {int run_i (int, char *[]);}; \
inline int ACE_Main::run_i (int argc, char *argv[]) \
{ \
return ace_main_i (argc, argv); \
} \
ACE_END_VERSIONED_NAMESPACE_DECL \
int \
ACE_MAIN (int argc, char *argv[]) /* user's entry point, e.g., wmain */ \
{ \
ACE_Main m; \
return m.run (argc, argv); /*ace_os_main_i (m, argc, argv); what the user calls "main" */ \
} \
int \
ace_main_i
# endif /* ACE_WIN32 && ACE_USES_WCHAR */
# else /* ACE_HAS_WINCE */
Anyways here is what I have tried for the above mentioned error message error so
error: cannot define member function 'ImageFramework::ACE_Main::run_i' within 'ImageFramework'
I have looked through the ImagFramework class source .h and .cpp which has multiple include files. (Furthermore this class acts as a base class to many other classes) to see if an ace library header was included however I could not find any. I would appreciate suggestions on what might be a systematic approach on finding out what might be causing this issue . I might even be wrong interpreting this message. My understanding of this message is that possibly a method in the imageframework class or a method in its base class might be triggering the above part of the code. Please correct me if I am wrong ? Any suggestions ideas on this issue would be appreciated. Are there any other reasons why i might be getting this ?
mainin your code, apart fromint main()function?