Hello Carsten,
> yes, that is a bit fragile. However, I'm wondering if being able to > have > a header that comes first in the generated code would even help you > much? Yes that would definately solve my problem. The only other permanent solution I see is having some kind of #ifdef around the windows.h include in OSGConfig.h like: #ifdef OSG_USING_MFC #include <afxwin.h> #else #include <windows.h> #endif > After all, all the other FieldContainer types still include > OSGConfig.h and thus either pull in windows.h or nothing (if > OSG_NO_WINDOWD_H_INCLUDE works), but not stdafx.h. That is actually not a problem. It is not forbidden to include windows.h, but it is forbidden to include windows.h *before* afxwin.h. Actually afxwin.h does include windows.h, but defines some stuff before doing that like different new handlers iirc. Additionally I think you may be confusing stdafx.h and afxwin.h - stdafx.h is the default name for an application-defined header used for precompiled headers. It usually includes either afxwin.h for MFC apps and dlls, or windows.h for non-MFC stuff. > Assuming windows.h is not included by OSGConfig.h, how would things > like > networking or the multi threading synchronization primitives work > without with WIN32 API ? > Or put differently, don't you have to modify OSGConfig.h to include > stdafx.h instead of windows.h to make this work? > Of course I may be missing something here, my windows/MFC knowledge is > somewhat limited ;) I hope i was able to make it clear. You can't loose WIN32 API stuff as both headers actually include windows.h. Of course you can also modify OSGConfig.h, that would also solve the problem, but being able to put some header above all others in the files generated from fcd's is simpler I guess and actually solves two problems - the MFC include file problem and the precompiled header support problem. Aloha, Andi ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
