TAdvChartView3D in one of our VCL based C++ projects under C++ Builder 2009.
There are two problems with this attempt:
1) An Open GL compiler error is generated in OpenGL.hpp after adding the following line to the top of the code module: #include <AdvChartView3D.hpp>. Note that <gl/gl.h> and <gl/glu.h> are included in the lines previous to your 3D include. The error that is generated by the compiler is: [BCC32 Error] Opengl.hpp(115): E2040 Declaration terminated incorrectly. The offending line is "static const Word GL_MAX_LIGHTS = 0xd31;" which looks harmless. If I rename "GL_MAX_LIGHTS" to "GL_MAX_LIGHTS2", then the problem moves on to issue number 2 below.
2) After fudging with OpenGL.hpp, then the following compiler errors are generated in your header files (Note that function overloads with different return types is not allowed in C++ - Functions must be named differently):
[BCC32 Error] Advopenglutil.hpp(162): E2356 Type mismatch in redeclaration of '_fastcall VectorAdd(const float *,const float *)'
[BCC32 Error] Advopenglutil.hpp(161): E2344 Earlier declaration of '_fastcall VectorAdd(const float *,const float *)'
[BCC32 Error] Advopenglutil.hpp(164): E2356 Type mismatch in redeclaration of '_fastcall VectorSubtract(const float *,const float *)'
[BCC32 Error] Advopenglutil.hpp(163): E2344 Earlier declaration of '_fastcall VectorSubtract(const float *,const float *)'
[BCC32 Error] Advopenglx.hpp(165): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(166): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(167): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(168): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(169): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(170): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(171): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(172): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(173): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(174): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(175): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(176): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(177): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(178): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(179): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(180): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(181): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(182): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(183): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(184): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(185): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(186): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(187): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(188): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(189): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(190): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(191): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(192): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(193): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(194): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(195): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(196): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(197): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(198): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(199): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(200): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(201): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(202): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(203): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(204): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(205): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(206): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(207): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(208): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(209): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(210): E2040 Declaration terminated incorrectly
[BCC32 Error] Advopenglx.hpp(210): E2228 Too many error or warning messages
To reproduce this:
Create a new project in C++ Builder 2009 and drop a TAdvChartView3D onto the form. Try to compile. Note that there are several issues with OpenGL.hpp. Manually include <gl/gl.h> and <gl/glu.h>. There will now be only one issue with OpenGL.hpp. Rename "GL_MAX_LIGHTS" to "GL_MAX_LIGHTS2". Now there will be issues with the ADV chart headers.
Additional notes: Tried a new project in XE2 and it did not generate any OpenGL.hpp compiler errors. However, it still generated a compiler error in your modules, same as in 2009.
This needs to work for C++ Builder 2009. What needs to be done?