Hello Andreas,

Andreas Halm wrote:
> I need a way to specify one header which is included before everything 
> else (using fcd2code r2013 to translate a fcd file). The problem is I am 
> using a self-made node in an MFC application, but OSGConfig.h includes 
> windows.h, which is not allowed in MFC applications. MFC apps must 
> include afxwin.h, which is usually done through the precompiled header 
> stdafx.h. Disabling windows.h inclusion using OSG_NO_WINDOWD_H_INCLUDE 
> (there is a typo in there btw) doesn’t help either because of missing 
> symbols.
> 
> I tried additionalIncludes="stdafx.h" but it puts the include in the 
> wrong place – right below OSGConfig.h, while I need it to be above all 
> other includes.
> 
> For the time being I add the include manually, but it will get lost 
> every time I change the fcd file.

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? 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.
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 ;)

        Cheers,
                Carsten

------------------------------------------------------------------------------
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

Reply via email to