A: 

Multiple definitions in the link phase is almost always caused by having code in header files but I'm not sure that's the case here.

Have a look at line 162 of xxx/DATASTRUCTURES/SET/set.h and line 28 of xxx/misc.h (post them here, with a few lines either side for context, for further help).

That appears to be where the conflict is, based on the messages you're getting. It may well be that your new stuff that you're interfacing with shares a type name with some of your current stuff.

paxdiablo
+1  A: 

Are the definitions of the print(std::string, int) and operator<< functions defined inside headers that you are including in multiple C files.

try adding inline before those functions, or defining the functions inside of one of your C files you are linking.

Edit: Your edit mentioned you are doing "recursive" includes: Do you have #ifdef guards around your include files? This will prevent the same translation unit from including the same header multiple times.

#ifndef __MY_FILENAME_H_
#define __MY_FILENAME_H_
// your header details
#endif // End of the file...

The define can be anything as long as its unique to the header file. Just follow some sort of standard.

Eld
A: 

In misc.h and set.h do you actually define the functions mentioned in the linker error, or do you just declare them as stubs?

If you actually define them, (i.e. if you actually implement function bodies) then you're likely to get multiple definition problems during the linker phase. You can either define them in a separate .cpp file, or else declare them using the inline keyword. The latter option is better if they are very short functions.

Charles Salvia
A: 

Look carefully at what you've changed - or added - since it last compiled successfully. Something odd is up with that new material.

Jonathan Leffler