samedi 27 décembre 2014

XCode 6 preprocessor directive ( #ifndef ) not working, can't use nested headers

I'm having troubles with nested headers,



//a.h

#ifndef a_h
#define a_h
#include<b.h>
#endif


//b.h

#ifndef b_h
#define b_h
#include<a.h>
#endif


Looks like the include guards are not working. In fact, I'm getting Apple Mach-O Linker Error, duplicate symbols, clang: error: linker command failed with exit code 1. What am I doing wrong? Thanks in advance for your help.




Aucun commentaire:

Enregistrer un commentaire