Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualmrheisenberg

Posted 12 September 2012 - 12:27 PM

I have a ''Utility.h'' header that has 2 functions in it(fully defined with bodies and everything,since I won't be changing them anytime soon).Once I included them in my .cpp files,it gave me an error for each .cpp file like:

void_cdecl MyFunction(char const*, char const*, unsigned int) (?MyFunction@@YAXPBD00GI@Z) alredy defined in MyModule.obj.

Every header file,including Utility.h has 2 include guards(pragma comment and ifndef) + it's only included in the cpp files,I don't understand why it would still give such an error.None of my other headers give such errors.

#2mrheisenberg

Posted 12 September 2012 - 12:27 PM

I have a ''Utility.h'' header that has 2 functions in it(fully defined with bodies and everything,since I won't be changing them anytime soon).Once I included them in my .cpp files,it gave me an error for each .cpp file like:

void_cdecl MyFunction(char const*, char const*, unsigned int) (?MyFunction@@YAXPBD00GI@Z) alredy defined in MyModule.obj.

Every header file,including Utility.h has 2 include guards(pragma comment and ifndef) + it's only included in the cpp files,I don't understand why it would still give such an error.None of my other headers give such errors.

#1mrheisenberg

Posted 12 September 2012 - 12:13 PM

I have a ''Utility.h'' header that has 2 functions in it(fully defined with bodies and everything,since I won't be changing them anytime soon).Once I included them in my .cpp files,it gave me an error for each .cpp file like:

void_cdecl MyFunction(char const*, char const*, unsigned int) (?MyFunction@@YAXPBD00GI@Z) alredy defined in MyModule.obj.

Every header file,including Utility.h has 2 include guards(pragma comment and ifndef) + it's only included in the cpp files,I don't understand why it would still give such an error.None of my other headers give such errors.

PARTNERS