hello @ all,
I have a problem with my class and the -Or option of FPC-2.2.2 I exoected that the -Or Option improves the perfomance. but in the constructor if i set the property value the app crashes with a "External SIGSEGV".
the external lib is SDL 1.2.11
my OS is Debian Etch linux x86_64
the class (reduced to the important things):
unit uSysInfo;
interface
uses
Classes, SysUtils, sdl, sdl_cpuinfo, logger;
type
{ TSysINfo }
TSysInfo = class
private
FCPU_RDTSC : SDL_Bool;
protected
public
property CPU_hasRDTSC : SDL_Bool read FCPU_RDTSC;
constructor Create;
destructor Destroy; override;
end;
implementation{ TSysINfo }
constructor TSysINfo.Create;
begin
FCPU_RDTSC := SDL_HasRDTSC(); // <- the crash happenes here
(External SISEGV)
end;SDL_HasRDTSC is defined in the header File:
function SDL_HasRDTSC : SDL_Bool;
cdecl; external {$IFDEF __GPC__}name 'SDL_HasRDTSC'{$ELSE}
SDLLibName{$ENDIF __GPC__};
{$EXTERNALSYM SDL_HasRDTSC}Is there a way to avoid this? Or did I make a mistake somewhere?
regards
alex
