Re: [fpc-pascal] How to free memory allocated by C++ library

2011-06-02 Thread Malcolm Poole
On 02/06/11 13:27, Henry Vermaak wrote: On 02/06/11 13:04, Jonas Maebe wrote: On 02 Jun 2011, at 10:35, Henry Vermaak wrote: If you add cmem to the start of your uses list, all the memory operations are routed through the c memory manager. You should then be able to use Free safely for poi

Re: [fpc-pascal] How to free memory allocated by C++ library

2011-06-02 Thread Jonas Maebe
On 02 Jun 2011, at 14:27, Henry Vermaak wrote: > On 02/06/11 13:04, Jonas Maebe wrote: >> >> On 02 Jun 2011, at 10:35, Henry Vermaak wrote: >>> >>> If you add cmem to the start of your uses list, all the memory operations >>> are routed through the c memory manager. You should then be able to

Re: [fpc-pascal] How to free memory allocated by C++ library

2011-06-02 Thread Henry Vermaak
On 02/06/11 13:04, Jonas Maebe wrote: On 02 Jun 2011, at 10:35, Henry Vermaak wrote: If you add cmem to the start of your uses list, all the memory operations are routed through the c memory manager. You should then be able to use Free safely for pointers that were allocated by your library

Re: [fpc-pascal] How to free memory allocated by C++ library

2011-06-02 Thread Jonas Maebe
On 02 Jun 2011, at 10:35, Henry Vermaak wrote: > On 01/06/11 21:27, Malcolm Poole wrote: >> Working from the instructions in CinFreepascal.pdf ( >> ftp://ftp.freepascal.org/pub/fpc/docs-pdf/CinFreePascal.pdf ) I have >> written an interface library to the C++ library libtesseract ( >> http://code

RE : RE : RE : [fpc-pascal] Linux i386 libraries and PIC

2011-06-02 Thread Ludo Brands
> > In systutils, most are push imm32 DefaultFormatSettings > (sysstr.inc). DefaultFormatSettings is defined in sysinth.inc > where it's declaration is followed by Formatsettings : > TFormatSettings absolute DefaultFormatSettings; . Is the > absolute directive known to cause PIC problems? >

RE : RE : RE : [fpc-pascal] Linux i386 libraries and PIC

2011-06-02 Thread Ludo Brands
I also noticed that all the "offending" routines start with a call fpc_geteipasebx which is typical for PIC, isn't it? Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

RE : RE : [fpc-pascal] Linux i386 libraries and PIC

2011-06-02 Thread Ludo Brands
Ran gdb to find out what happens on the addresses listed below. In systutils, most are push imm32 DefaultFormatSettings (sysstr.inc). DefaultFormatSettings is defined in sysinth.inc where it's declaration is followed by Formatsettings : TFormatSettings absolute DefaultFormatSettings; . Is the abs

Re: [fpc-pascal] How to free memory allocated by C++ library

2011-06-02 Thread Henry Vermaak
On 01/06/11 21:27, Malcolm Poole wrote: Working from the instructions in CinFreepascal.pdf ( ftp://ftp.freepascal.org/pub/fpc/docs-pdf/CinFreePascal.pdf ) I have written an interface library to the C++ library libtesseract ( http://code.google.com/p/tesseract-ocr ). Everything appears to work we