When I include <d3d11.h> file in Embarcadero RadStudio seattle 10 C++ IDE, compiler gives the following error:
[bcc64 Error] d3d11.h(9622): 'selectany' attribute is only valid on the initialization of global data with external linkage.
Please help me.
d3d11.his a Microsoft header for Direct3D.Microsoft's flavor of
selectanydiffers slightly from Embarcadero's flavor ofselectany.In particular, Microsoft's flavor supports default-initialization of global object instances, whereas Embarcadero's does not. Globals must be initialized with data.
d3d11.h(being a Microsoft header) is relying on Microsoft'sselectanybehavior. The variable in question (D3D11_VIDEO_DEFAULT) is not being initialized with any data, which is OK in Microsoft's compiler but is not OK in Embarcadero's compiler.You would have to alter Embarcadero's copy of
d3d11.hto add an initialization: