"Including GapiDrawApplication.h more than once" #2

Posted:
Oct 18, 2002 @ 1:22pm
by Mr.Prayer
I've got difficultys with subj.
There are topic with description same problem here ().
But there is no solution.
This feature is very important for me.
Can i hope this problem will be solved in some of next versions?

Posted:
Oct 19, 2002 @ 12:02am
by Hosed
Actually the whole point of #ifndefs and #pragma once is to alleviate those problems. You wouldn't get that error from your sample code.
The best way around this is just to include the header in another header (like stdafx) and then in that header be sure to wrap the includes with #ifndef or #pragma once. Then all the sub modules that need that header should just include the main header it's in.
I do this a lot in my projects by setting up large component headers that contain all the various classes and library headers for that major component that might be needed by the individual pieces.