[lazarus] cdecl external C

2006-08-21 Thread Alain Michaud
Hi, this message is not for reporting a bug but I would like to know more about the following: When I open a "New Project" / "Application", then the following external function WORKS WELL: function j0(x:double):double;cdecl;external 'c'; Now, when I open a "New Project" / "Program", then I g

Re: [lazarus] cdecl external C

2006-08-21 Thread Vincent Snijders
Alain Michaud wrote: Hi, this message is not for reporting a bug but I would like to know more about the following: When I open a "New Project" / "Application", then the following external function WORKS WELL: function j0(x:double):double;cdecl;external 'c'; Now, when I open a "New Project

Re: [lazarus] cdecl external C

2006-08-21 Thread Mattias Gaertner
On Mon, 21 Aug 2006 18:43:15 +0200 Vincent Snijders <[EMAIL PROTECTED]> wrote: > Alain Michaud wrote: > > Hi, > > this message is not for reporting a bug but I would like to know > > more about the following: > > > > When I open a "New Project" / "Application", then the following > > external f

Re: [lazarus] cdecl external C

2006-08-22 Thread Marco van de Voort
On Mon, Aug 21, 2006 at 07:20:21PM +0200, Mattias Gaertner wrote: > > An custom program doesn't link to c. > > You can add > {$linklib c} but you _should_ Uses InitC; and define the function as function j0(x:double):double;cdecl;external clib; which abstracts the name of libc and takes car

Re: [lazarus] cdecl external C

2006-08-22 Thread Alain Michaud
thank you for the help, but it does not work ! I have tried for many hours, but nothing works. I have also tried dynamic loading and it failed as well. It finds the library but not the function. (In a lazarus project, the function works very well however) It looks like it finds the library, b