Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-11

Can't create unique type from this type

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Steve Williams
//----------------------------------------------------------------------------
// D3DXHANDLE:
// -----------
// Handle values used to efficiently reference shader and effect parameters.
// Strings can be used as handles.  However, handles are not always strings.
//----------------------------------------------------------------------------
type
    PD3DXHandle = ^TD3DXHandle;
    TD3DXHandle = type PAnsiChar;

The type declaration "TD3DXHandle = type PAnsiChar" (they are of the same type, but not assign compatible) compiles fine in Delphi, but FPC gives the error
"d3dx9.pas(1999,31) Error: Can't create unique type from this type"

How do I get this type declaration to compile in FPC? I am compiling in Delphi mode (-Mdelphi) with FPC 1.9.4.

Sly

Reply by email

Peter Vreman
to Steve Williams
Show quoted text 21 lines
//---------------------------------------------------------------------------- // D3DXHANDLE: // ----------- // Handle values used to efficiently reference shader and effect parameters. // Strings can be used as handles. However, handles are not always strings. //---------------------------------------------------------------------------- type PD3DXHandle = ^TD3DXHandle; TD3DXHandle = type PAnsiChar; The type declaration "TD3DXHandle = type PAnsiChar" (they are of the same type, but not assign compatible) compiles fine in Delphi, but FPC gives the error "d3dx9.pas(1999,31) Error: Can't create unique type from this type" How do I get this type declaration to compile in FPC? I am compiling in Delphi mode (-Mdelphi) with FPC 1.9.4.

Compiles fine with current development version (1.9.5)

Reply by email