Zorgoth
January 19th, 2009, 01:42 AM
I'm using QT with C++ and a while ago I put some functions in a header to use in a program I'm writing. But now that I have two separate .cpp programs using it, I'm getting errors from "make" about multiple definitions of functions from said header file, one in each .o file including my header.
The functions are defined on the same line of the same file, with the usual #ifndef #define #endif routine to protect the definitions.
It should be noted that this is the first time I've done a project involving multiple .cpp files.
Is there something special one has to do to use a header file in C++/QT for anything but a class definition?
The functions are defined on the same line of the same file, with the usual #ifndef #define #endif routine to protect the definitions.
It should be noted that this is the first time I've done a project involving multiple .cpp files.
Is there something special one has to do to use a header file in C++/QT for anything but a class definition?