Re: [fpc-pascal] Multipe path in TProcess.Environment ?

2015-06-21 Thread Tomas Hajny
On Mon, June 22, 2015 00:24, fredvs wrote: . . >> So LD_PRELOAD and LD_LIBRARY_PATH are unix only ? >> What about Windows, what should be the TProcess.Environment.Text ? > > => not OK. I'm not aware of an equivalentof LD_PRELOAD on Windows. As far as LD_LIBRARY_PATH is concerned - as far as I k

Re: [fpc-pascal] Multipe path in TProcess.Environment ?

2015-06-21 Thread fredvs
> Ha, ok... (by the way, what character is "colon" ?) => https://en.wikipedia.org/wiki/Colon_%28punctuation%29 => OK. But => > So LD_PRELOAD and LD_LIBRARY_PATH are unix only ? > What about Windows, what should be the TProcess.Environment.Text ? => not OK. Thanks. Fre;D - Many thanks

Re: [fpc-pascal] Multipe path in TProcess.Environment ?

2015-06-21 Thread fredvs
@ Thomas => tanks for answer. > Unix uses a colon as path delimiter, not semicolon. I don't know about > LD_PRELOAD, but it should work at least for LD_LIBRARY_PATH. Ha, ok... (by the way, what character is "colon" ?) So LD_PRELOAD and LD_LIBRARY_PATH are unix only ? What about Windows, what sh

Re: [fpc-pascal] FPC linker oddity

2015-06-21 Thread Tomas Hajny
On Sun, June 21, 2015 22:58, Jonas Maebe wrote: > On 21/06/15 22:20, patspiper wrote: >> On 21/06/15 23:08, Jonas Maebe wrote: >>> On 21/06/15 21:43, patspiper wrote: Changing the GetTickCount declaration to any of the following works: Function GetTickCount: DWORD; external name '

Re: [fpc-pascal] FPC linker oddity

2015-06-21 Thread patspiper
On 21/06/15 23:58, Jonas Maebe wrote: On 21/06/15 22:20, patspiper wrote: So what should be done to remedy the Windows case when $LINKLIB is used, that is unless $LINKLIB is not to be used with Windows? {$linklib xxx} can be useful on Windows if you have a DLL that has an initialisation routin

Re: [fpc-pascal] Multipe path in TProcess.Environment ?

2015-06-21 Thread Tomas Hajny
On Sun, June 21, 2015 22:55, fredvs wrote: > Hello. > > If a TProcess runs a executable who needs a library, that does the trick > => > TProcess.Environment.Text := 'LD_PRELOAD='/the/directory/of/thelibrary.so' > ; > > You may also use this => (it seems bad ;-( => > http://xahlee.info/UnixResource_

Re: [fpc-pascal] FPC linker oddity

2015-06-21 Thread Jonas Maebe
On 21/06/15 22:20, patspiper wrote: > On 21/06/15 23:08, Jonas Maebe wrote: >> On 21/06/15 21:43, patspiper wrote: >>> Changing the GetTickCount declaration to any of the following works: >>>Function GetTickCount: DWORD; external name >>> '_$dll$kernel32$GetTickCount'; >>>Function GetTickCo

[fpc-pascal] Multipe path in TProcess.Environment ?

2015-06-21 Thread fredvs
Hello. If a TProcess runs a executable who needs a library, that does the trick => TProcess.Environment.Text := 'LD_PRELOAD='/the/directory/of/thelibrary.so' ; You may also use this => (it seems bad ;-( => http://xahlee.info/UnixResource_dir/_/ldpath.html ) => TProcess.Environment.Text := 'LD

Re: [fpc-pascal] FPC linker oddity

2015-06-21 Thread patspiper
On 21/06/15 23:08, Jonas Maebe wrote: On 21/06/15 21:43, patspiper wrote: program Project1; {$Linklib kernel32} Function GetTickCount: DWORD; external; begin WriteLn ('GetTickCount ', GetTickCount); end. project1.lpr(10,1) Error: Undefined symbol: P$PROJECT1_$$_GETTICKCOUNT$$LONGWORD Chan

Re: [fpc-pascal] FPC linker oddity

2015-06-21 Thread Jonas Maebe
On 21/06/15 21:43, patspiper wrote: > program Project1; > {$Linklib kernel32} > Function GetTickCount: DWORD; external; > begin > WriteLn ('GetTickCount ', GetTickCount); > end. > project1.lpr(10,1) Error: Undefined symbol: > P$PROJECT1_$$_GETTICKCOUNT$$LONGWORD > > Changing the GetTickCount d

[fpc-pascal] FPC linker oddity

2015-06-21 Thread patspiper
The following simple program which uses the $LINKLIB compiler directive builds fine under Linux: program Project1; {$Linklib c} Const P : PChar = 'This is fun !'; Function strlen (P: PChar): Longint; cdecl; external; begin WriteLn ('Length of (',p,') : ',strlen(p)) end. However, cross-compili

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: SizeInt documentation

2015-06-21 Thread leledumbo
> Then something is wrong with how the documentation is "generated" (shouldn't it be written by a human?). In these automatic documentation generator days? I don't think so. > A documenation of a type that has different meanings on different > platforms should tell about this. > That's what a do

Re: [fpc-pascal] Object file requiring kernel32.dll functions

2015-06-21 Thread patspiper
On 21/06/15 18:09, patspiper wrote: The situation is as follows: - Platform: Windows - file1.obj: 3rd omf object file (no source available) that can be used by Delphi linker and calls kernel32.dll functions such as GetTickCount and GetLastError. - file1.coff: file1.obj converted to coff for

Re: [fpc-pascal] *** GMX Spamverdacht *** Re: SizeInt documentation

2015-06-21 Thread Jürgen Hestermann
Am 2015-06-21 um 16:25 schrieb leledumbo: but the documentation says that it is always Longint. Can someone please correct this as it causes a lot of confusion. fpdoc parser understands and interprets compiler directives, so it can't display something that's defined differently for each platform

[fpc-pascal] Object file requiring kernel32.dll functions

2015-06-21 Thread patspiper
The situation is as follows: - Platform: Windows - file1.obj: 3rd omf object file (no source available) that can be used by Delphi linker and calls kernel32.dll functions such as GetTickCount and GetLastError. - file1.coff: file1.obj converted to coff format using objconv.exe (http://www.ag

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread patspiper
On 21/06/15 17:46, Marco van de Voort wrote: In our previous episode, patspiper said: INPUT( -l c ) I think that should be "-lc", not "-l c". I don't know where the extra space is coming from in your case. Exactly! I have just posted a message with my findings. Which program produces link.res

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread Marco van de Voort
In our previous episode, patspiper said: > >> INPUT( > >> -l c > >> ) > > I think that should be "-lc", not "-l c". I don't know where the extra > > space is coming from in your case. > Exactly! > > I have just posted a message with my findings. Which program produces > link.res? Maybe the probl

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread Jonas Maebe
On 21/06/15 15:50, patspiper wrote: > So the issue is fpc producing link.res with a -l c instead of -lc. Which > program specifically produces link.res? It's the compiler. But this can't be a problem that always occurs, because otherwise "make all" would fail too as fpmake by default also links to

Re: [fpc-pascal] SizeInt documentation

2015-06-21 Thread leledumbo
> but the documentation says that it is always Longint. > Can someone please correct this as it causes a lot of confusion. fpdoc parser understands and interprets compiler directives, so it can't display something that's defined differently for each platform. As you can see, we have *nix units doc

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread patspiper
On 21/06/15 16:40, Jonas Maebe wrote: On 21/06/15 11:28, patspiper wrote: Using 'ppc386 -s program1.pp' instead, line 121 of link.res is '-l c' in the section: INPUT( -l c ) I think that should be "-lc", not "-l c". I don't know where the extra space is coming from in your case. Exactly! I ha

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread patspiper
On 21/06/15 14:58, Marco van de Voort wrote: In our previous episode, patspiper said: Compiling the following simple program (from fpc prog manual http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46) yields a linking syntax error: Is this a bug? Not of a general kind, since i

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread Jonas Maebe
On 21/06/15 11:28, patspiper wrote: > Using 'ppc386 -s program1.pp' instead, line 121 of link.res is '-l c' in > the section: > INPUT( > -l c > ) I think that should be "-lc", not "-l c". I don't know where the extra space is coming from in your case. Jonas __

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread Mark Morgan Lloyd
patspiper wrote: On 21/06/15 14:58, Marco van de Voort wrote: In our previous episode, patspiper said: Compiling the following simple program (from fpc prog manual http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46) yields a linking syntax error: Is this a bug? Not of a gene

[fpc-pascal] SizeInt documentation

2015-06-21 Thread Jürgen Hestermann
The documenation in http://www.freepascal.org/docs-html/rtl/system/sizeint.html says: --- SizeInt Signed integer type which fits for sizes Declaration Source position: systemh.inc line 251 type SizeInt= LongInt

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread patspiper
On 21/06/15 14:58, Marco van de Voort wrote: In our previous episode, patspiper said: Compiling the following simple program (from fpc prog manual http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46) yields a linking syntax error: Is this a bug? Not of a general kind, since i

Re: [fpc-pascal] FPC linking syntax error

2015-06-21 Thread Marco van de Voort
In our previous episode, patspiper said: > Compiling the following simple program (from fpc prog manual > http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46) > yields a linking syntax error: > Is this a bug? Not of a general kind, since it works on most Linux distros. E.g. i

[fpc-pascal] FPC linking syntax error

2015-06-21 Thread patspiper
Hi, Compiling the following simple program (from fpc prog manual http://www.freepascal.org/docs-html/prog/progsu46.html#x53-520001.2.46) yields a linking syntax error: program Project1; {$Linklib c} Const P : PChar = 'This is fun !'; Function strlen (P: PChar): Longint; cdecl; external; begin