> From: Henry Vermaak > Subject: Re: [fpc-pascal] Re: Runs correctly when debugging. > > It's hard to say without seeing your function/type declarations.
Actually I don't call the function that raises the SIGSEGV signal, since it's an internal function. Allegro has a "driver" struct (RECORD) that stores a pointer to this function only if OpenGL is used (else it uses DirectX or something like that), then functions that uses or modifies the "bitmap" struct uses it. For example, it's used by next function: ALLEGRO_BITMAP *al_load_bitmap(const char *filename); The wrapper I wrote is: TYPE (* Abstract type representing a bitmap (2D image). *) ALLEGRO_BITMAPptr = POINTER; FUNCTION al_load_bitmap (CONST filename: STRING): ALLEGRO_BITMAPptr; CDECL; EXTERNAL ALLEGRO_LIB_NAME; I'm concerning about the "STRING" type as it may affect the stack (I had problems with enumerations because FPC optimised them and C doesn't) and use "PCHAR" instead, but manual says it's not a problem if using "-h" or "{$LONGSTRINGS ON}". _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal