This isn't a C forum...but what the heck, since I know C too:
you're defining a function in your .h file which is generally not a good idea (as you've found out). You should move the function out of the .h file and into a .c or .cpp file. If you REALLY, REALLY ,REALLY need to have it in a .h file, you can define it as a preprocessor macro instead of a function -- not advisable, but it'll work.
.h files are Header files. They typically contain declarations, constants, and other interface items.
.c, .cpp files are C source files which typically contain the actual code.