Re: [fpc-pascal] linking to a shared library (linux platform)

2006-01-03 Thread Marco van de Voort
> I would appreciate some advice about the following (I try to be clear > and short!): > > I am trying to dynamically link a shared library ("libplot.so" from the > package: www.gnu.org/software/plotutils ). I do this using "dlopen" and > "dlsym". Usually it works very well but this time, I do not

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread eduard stefan
Hello L505, Tuesday, January 3, 2006, 4:30:23 AM, you wrote: > Trustmaster from PSP project tells me he's been using Ansistrings in DLL > without > problems. The entire psp.furtopia.org website is running a DLL with > ansistrings in > it, he says. > ... > Can it be something in FPC 1.0 compiler

[fpc-pascal] linking to a shared library (linux platform)

2006-01-03 Thread Alain Michaud
Hi everyone, I would appreciate some advice about the following (I try to be clear and short!): I am trying to dynamically link a shared library ("libplot.so" from the package: www.gnu.org/software/plotutils ). I do this using "dlopen" and "dlsym". Usually it works very well but this time, I do n

Re: [fpc-pascal] StrToQWord seems missing

2006-01-03 Thread Florian Klaempfl
Vincent Snijders wrote: Vincent Snijders wrote: Hi, I want to covert a string to qword, but strtoqword seems to be missing? Attached is a patch to implement StrToQWord and related functions and a test program. If you make test programs, please ensure that they can run automated: i.e. il

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-03 Thread Jonas Maebe
On 03 Jan 2006, at 19:57, Hans Mårtensson wrote: So I tried: if DialogBoxIndirect(0, pBox2, Window, Box2Proc) = 0 then exit; And the compiler assessed that the number of parameters was wrong. But this is an error in message, because the number of parameters is right. It was probably compla

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-03 Thread Hans Mårtensson
Jonas Maebe wrote: On 28 Dec 2005, at 23:49, Hans Mårtensson wrote: The problem was the following program line, using the windows unit: if DialogBoxIndirect(0, pBox2, Window, @Box2Proc) = 0 then exit; The compiler assessed an error in parameter 4. Should not be an address, but a variable.

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> simple and small unit. Advantages over sharemem are with cmem you wouldn't > have to > ship sharemem.dll with the application. > In fact, if someone has not already done it, the cmem.pp unit could be converted for use with delphi too (cmem.pas), since no one enjoys shipping sharemem dll. I w

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> > If a Pascal program returns a reference counted type to a C library, > then you get a memory leak, sharemem/cmem or not. If a C program > passes a pchar to a function that expects an ansistring, you can get > any sort of behaviour ranging from no problem to program crashes > (which is logical,

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Jonas Maebe
On 03 Jan 2006, at 18:49, L505 wrote: A very easy way to solve all problems in FPC is to simply use the cmem unit in the dll(s) and in your main program. It should have the same effect as Delphi's sharemem unit. Would that work with C programs that called a library? I think sharemem only wo

Re: [fpc-pascal] Executable size question

2006-01-03 Thread L505
> Helo everyone, I would like to ask why are exes generated by FPC so big? > Simple writeln('Hi'); has about 28 KB. Old FPC 1.0.0 for example created > for the same code only 14 kb exe. > What Should I do to reduce the file size (without compression) > Pianoman You can work on a custom System u

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> > On 03 Jan 2006, at 18:29, L505 wrote: > > > I can post the psp 1.0 sources online if anyone is interested, but > > probably it is > > only me who is so curious ;-) > > A very easy way to solve all problems in FPC is to simply use the > cmem unit in the dll(s) and in your main program. It shou

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Jonas Maebe
On 03 Jan 2006, at 18:29, L505 wrote: I can post the psp 1.0 sources online if anyone is interested, but probably it is only me who is so curious ;-) A very easy way to solve all problems in FPC is to simply use the cmem unit in the dll(s) and in your main program. It should have the sa

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> L505 wrote: > > Can it be something in FPC 1.0 compiler that allowed this to happen? I > > guess I'll > > have to do more digging. I wish I could put an end to this and just use > > Pchars in > > these DLL situations - but there's always some evidence of ansistrings > > working, > > somewhe

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> On Mon, 2 Jan 2006, L505 wrote: > > > Trustmaster from PSP project tells me he's been using Ansistrings in DLL > > without > > problems. The entire psp.furtopia.org website is running a DLL with > > ansistrings in > > it, he says. > > > > He says he compiled it with FPC 1.0 a long time ago.. >

Re: [fpc-pascal] StrToQWord seems missing

2006-01-03 Thread Vincent Snijders
Vincent Snijders wrote: Hi, I want to covert a string to qword, but strtoqword seems to be missing? Attached is a patch to implement StrToQWord and related functions and a test program. Vincent. Index: objpas/sysutils/sysstr.inc ===

[fpc-pascal] StrToQWord seems missing

2006-01-03 Thread Vincent Snijders
Hi, I want to covert a string to qword, but strtoqword seems to be missing? I could use StrToInt64 like in the program below, but I am worried, that if I recompile the RTL with rangechecks on, StrToInt64 won't be abel to handle these high qword values. Will there be a StrToQWord in the future,

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Michael Van Canneyt
On Mon, 2 Jan 2006, L505 wrote: Trustmaster from PSP project tells me he's been using Ansistrings in DLL without problems. The entire psp.furtopia.org website is running a DLL with ansistrings in it, he says. He says he compiled it with FPC 1.0 a long time ago.. So the psp.furtopia website

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Micha Nelissen
L505 wrote: Can it be something in FPC 1.0 compiler that allowed this to happen? I guess I'll have to do more digging. I wish I could put an end to this and just use Pchars in these DLL situations - but there's always some evidence of ansistrings working, somewhere. There is an important diff

Re: [fpc-pascal] Executable size question

2006-01-03 Thread Florian Klaempfl
Pianoman wrote: > Helo everyone, I would like to ask why are exes generated by FPC so big? > Simple writeln('Hi'); has about 28 KB. Old FPC 1.0.0 for example created > for the same code only 14 kb exe. > What Should I do to reduce the file size (without compression) Use 1.0.10 ;) 2.x simply has

[fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
Trustmaster from PSP project tells me he's been using Ansistrings in DLL without problems. The entire psp.furtopia.org website is running a DLL with ansistrings in it, he says. He says he compiled it with FPC 1.0 a long time ago.. So the psp.furtopia website has been using ansistrings in DLL for

Re: [fpc-pascal] GTK2 and arm-linux [Update]

2006-01-03 Thread Koenraad Lelong
Koenraad Lelong wrote: Hi, Has anyone successfully used the GTK2-library for an arm-processor ? Today I tried the helloworld-demoes, which segfault. I tried gdb but didn't find anything (gdb is brand new for me, so without much more reading it will remain so I fear). I tried a dummy program, ju

[fpc-pascal] Executable size question

2006-01-03 Thread Pianoman
Helo everyone, I would like to ask why are exes generated by FPC so big? Simple writeln('Hi'); has about 28 KB. Old FPC 1.0.0 for example created for the same code only 14 kb exe. What Should I do to reduce the file size (without compression) Pianoman - Original Message - From: <[EMAIL PRO

Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-03 Thread Jonas Maebe
On 28 Dec 2005, at 23:49, Hans Mårtensson wrote: The problem was the following program line, using the windows unit: if DialogBoxIndirect(0, pBox2, Window, @Box2Proc) = 0 then exit; The compiler assessed an error in parameter 4. Should not be an address, but a variable. Is your Box2Proc pro