- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Trying to rebuild my programs on XE2017 (ID w_comp_lib_2017.4.210) under Microsoft Visual Studio Enterprise 2015 (Version 14.0.25431.01 Update 3)
Get an error:
error #8752: This derived type component of an interoperable type is not itself interoperable (does not have the BIND(C) attribute). [PALPALENTRY]
Any Ideas
Snippet from code see: below:
! Declare our own type for LOGPALETTE - the one in IFWINTY has just
! one element. The C code used malloc, and there are various Fortran
! ways we could fudge this, but the following seems simplest. Note that
! there is a 256-entry limit to a palette.
type, bind(C) :: OUR_LOGPALETTE
integer(WORD) palVersion
integer(WORD) palNumEntries
TYPE (T_PALETTEENTRY) palPalEntry(0:255)
- Balises:
- Intel® Fortran Compiler
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
type :: OUR_LOGPALETTE sequence integer(WORD) palVersion integer(WORD) palNumEntries TYPE (T_PALETTEENTRY) palPalEntry(0:255) end type OUR_LOGPALETTE
Removing bind(c) and add sequence works.
Lien copié
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
type :: OUR_LOGPALETTE sequence integer(WORD) palVersion integer(WORD) palNumEntries TYPE (T_PALETTEENTRY) palPalEntry(0:255) end type OUR_LOGPALETTE
Removing bind(c) and add sequence works.
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Otherwise you would need to define your own type MY_T_PALAETTENTRY with bind(c)
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank you Andrew. The "sequence" option works a treat..

- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable