0
0

Hello everybody,

as I tried to compile some of the examples in the current fmod 3.71 package my Delphi 6 always issued an error concerning some compiler warning switch used in fmod 3.71. In my case it was {$WARN UNSAFE_TYPE OFF}.
This seems to be one of the .NET related warnings introduced with Delphi 7 (Unsafe_Type, Unsafe_Code and Unsafe_Cast). These warnings are not known to previous versions of Delphi, thus causing unneccessary incompatibilities.

Wouldn’t it be good to enclose the .NET warnings with an {$IFDEF VER150} compiler directive?

Regards,
Malte

  • You must to post comments
0
0

That can be done. I wasn’t aware that those compiler directives caused actual compiler errors. Is it an error or a warning? Does it stop compilation?

  • You must to post comments
0
0

[quote:n2yjs6rb]Is it an error or a warning? Does it stop compilation?[/quote:n2yjs6rb]

It is an error which stops compilation. Since I only have the german version of Delphi 6 I cannot give you the exact error message but it should translate to something like the following:

[code:n2yjs6rb][Error] fmodtypes.pas(63): Invalid compiler directive: ‘UNSAFE_TYPE'[/code:n2yjs6rb]

Regards,
Malte

  • You must to post comments
0
0

You can safely remove them from your version of the files.

  • You must to post comments
0
0

Thank you very much for your reply. I deleted them at first but then a friend of mine, who wanted to have a look at the code had all these .NET warnings.

So I put this back into the fmod code:

{$IFDEF VER150}
{$WARN UNSAFE_TYPE OFF}
{$ENDIF}

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.