- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Otherwise you would need to define your own type MY_T_PALAETTENTRY with bind(c)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Andrew. The "sequence" option works a treat..

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page