VS and MRef to forward declarations ?
Philippe Torrelli
philippe.torrelli at alcatel-lucent.fr
Thu Feb 1 20:28:57 CET 2007
Hello,
I'm trying to compile a recent version of minisip with visual studio.
What I found in some places is a pattern like this
Bfile.h:
class A;
class B
{
MRef< A *> member;
.....
};
Cfile.cxx:
#include "Bfile.h" <- makes the compilation fail
saying it's not possible to use the uncomplete type ( I don't have the
English message but you get the idea ).
-----------
For example every source file that includes - directly or not
-libmikey/KeyAgreement.h and do not include libmikey/MikeyMessage.h
cause this problem...
The output of visual studio makes it difficult to pinpoint the real culprit
because often 'Cfile' doesn't directly include A.h but a .h that includes a
.h that includes .. ( and so on ) and one of the .h included is a.
And so it's difficult to figure out which class causes wich problem ...
So I found nothing to do but find with the compilation error output which
.cxx requires which types, add the 'desired' includes in the cxx.. but of
course it makes you 'fix' it at many places when it possibly could be fixed
in a fewer places..
Are you interested in the list of such 'fixes' ?
Regards
Philippe Torrelli
More information about the Minisip-devel
mailing list