Re: [fpc-pascal] not possible add into class helper overloaded variant of some virtual method

2013-11-18 Thread Sven Barth

On 18.11.2013 18:05, ko paka wrote:

Hello,

in actual trunk - fpc 2.7.1 -  is not possible to do folloving:


[snip]


When I try to compile it, error "Wrong number of parameters " will
be shown. Based on documentation I found
(http://www.freepascal.org/docs-html/ref/refse50.html) it should be
possible. Is it a bug or am I missed something ?

One point more - when I had defined class helper type in same unit as
main program (so not in separate unit uStringListHelper), compiler
behavior was like there is no class helper defined. Is this correct as
well ?


Both cases should work. Please report a bug.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] not possible add into class helper overloaded variant of some virtual method

2013-11-18 Thread ko paka
Hello,

in actual trunk - fpc 2.7.1 -  is not possible to do folloving:

unit uStringListHelper;

{$mode delphiunicode}

interface

uses
  Classes, SysUtils;

type

  { TStringListHelper }

  TStringListHelper = class helper for TStringList
  public
procedure LoadFromFile(const FileName: string; Encoding: TEncoding);
overload;
  end;


implementation

{ TStringListHelper }

procedure TStringListHelper.LoadFromFile(const FileName: string;
  Encoding: TEncoding);
begin

end;

end.




program testoverloadinclasshelper;

{$mode delphiunicode}

uses
  Classes, SysUtils, uStringListHelper;

var
  m: TStringList;
begin
  m := TStringList.Create;
  m.LoadFromFile('somefile.txt', TEncoding.UTF8);
end.


When I try to compile it, error "Wrong number of parameters " will be
shown. Based on documentation I found (
http://www.freepascal.org/docs-html/ref/refse50.html) it should be
possible. Is it a bug or am I missed something ?

One point more - when I had defined class helper type in same unit as main
program (so not in separate unit uStringListHelper), compiler behavior was
like there is no class helper defined. Is this correct as well ?

regards
tomas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem building fixes_2_6

2013-11-18 Thread Reinier Olislagers
On 18/11/2013 15:49, waldo kitty wrote:
> On 11/18/2013 2:01 AM, Reinier Olislagers wrote:
>> On 18/11/2013 00:48, waldo kitty wrote:
>>> On 11/17/2013 12:41 PM, Reinier Olislagers wrote:
 On 17/11/2013 18:38, Marco van de Voort wrote:
> In our previous episode, Reinier Olislagers said:
>>> [...]
>> Is it me, fpcup or should something be fixed in... ehrm fixes?[1]
>> I noticed the Jenkins build server seems to build fixes ok...
>
> IIRC this means you are not using 2.6.2 issued make, but 3.82?

 Yes, of course  - of course this is coming back to bite
 me...

 Thanks a lot, guys.
>>>
>>> how has fpcup been able to build 2.6.x if fpc 2.6.x cannot be made with
>>> make 3.82?
>>>
>>
>> By downloading and using make, as usual.
> 
> seems my question was misunderstood... the previous conversations seem
> to indicate that make 3.82 was being (downloaded and??) used instead of
> 3.80... that's why i asked how fpc 2.8.x had been being built with make
> 3.82...

Well, IMO if you have no experience with fpcup it's hard to tell what
the conversation seems to indicate. That was more or less my point.

In any case, my problem was already solved.

Thanks,
Reinier


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Problem building fixes_2_6

2013-11-18 Thread waldo kitty

On 11/18/2013 2:01 AM, Reinier Olislagers wrote:

On 18/11/2013 00:48, waldo kitty wrote:

On 11/17/2013 12:41 PM, Reinier Olislagers wrote:

On 17/11/2013 18:38, Marco van de Voort wrote:

In our previous episode, Reinier Olislagers said:

[...]

Is it me, fpcup or should something be fixed in... ehrm fixes?[1]
I noticed the Jenkins build server seems to build fixes ok...


IIRC this means you are not using 2.6.2 issued make, but 3.82?


Yes, of course  - of course this is coming back to bite
me...

Thanks a lot, guys.


how has fpcup been able to build 2.6.x if fpc 2.6.x cannot be made with
make 3.82?



By downloading and using make, as usual.


seems my question was misunderstood... the previous conversations seem to 
indicate that make 3.82 was being (downloaded and??) used instead of 3.80... 
that's why i asked how fpc 2.8.x had been being built with make 3.82...



You haven't ever used fpcup, have you?


not yet... it is on the list but i also don't want to crash my current working 
setup where fpc and lazarus are "installed" in their checkout directories (as 
described in the wiki)... it works and i'm used to it but it did take me some 
time to understand it ;)


--
NOTE: No off-list assistance is given without prior approval.
  Please keep mailing list traffic on the list unless
  private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ibase package

2013-11-18 Thread Antonio Fortuny

  
  

Le 18/11/2013 13:15, Tony Whyman a
  écrit :


  
  Antonio,
  
  Be careful on Ubuntu (as with all Debian) you only get
  libfbclient.so installed when you also have the development
  package (firebird-dev) installed. Better to load the
  libfbclient.so.2 library which gets installed with the libfclient2
  package.

Right, I've noticed it. For the time being, I've only copied the
original Firebird library fblclient.so.2 to local fbclient.so.
Anyway, I'm happy because the program works independently of the
current FB library.
On the other hand, we are used to install and work with FB since
years and the library problem is well known. But because I'm also
concerned with Linux application development (mainly services and
libraries  ;-) )
installation team still forgets to install native client FB
librarie.
Thans for focusing my attention on this operational problem.

Antonio.

 
  Regards
  
  Tony Whyman
  MWA Software
  
  On 18/11/13 12:11, Antonio Fortuny
wrote:
  
  


Le 18/11/2013 13:08, Antonio
  Fortuny a écrit :


  
  
  Le 18/11/2013 12:19, Michael Van
Canneyt a écrit :
  
   

On Mon, 18 Nov 2013, Antonio Fortuny wrote: 

Hi Folks. 
  
  I'm a little bit annoyed by a boring specification in the
  fpc package. When in a program I use the TIBConnection
  (along witha transaction and a query), the compiled
  program looks for the local libfbclient when establishing
  the connection. 
  So far so good. When I install the program in another
  Linux box, running Firebird 2.1, the program complains
  that 
  "Can not load default Firebird clients
  ("libfbclient.so.2.5" or "libgds.so" or
  "libfbembed.so.2.5")". Looks normal as this Linux box uses
  Firebird 2.1 
  Is it possible to force what library should be used
  instead ? (as UIB does) 
  Having a look inside the code, in ibase60 (lines 2680 and
  fw) library names look fixed and looks like the Firebird
  version should be fixed before using it. 


You can do 2 things: 

1. use the TSQLDBLibraryLoader component from sqldblib (in
trunk) 

2. call 
   function InitialiseIBase60(Const LibraryName :
AnsiString) : integer; 
  
  found it in ibase60dyn.pp --> ibase60.inc
  before connecting to the DB:
      InitialiseIBase60('libfbclient.so');

changing previous line to 
  InitialiseIBase60('./libfbclient.so');
works.

Thanks

Antonio.

 compile on one system (OpenSuse x86_64), copy to
  the target system (Ubuntu x86_64)
  target systemp library /usr/lib/libfbclient.so.2 copied in
  current directory as libfbclient.so
  then run and:
  An unhandled exception occurred at $004B544B :
  EInOutError : Can not load Firebird client library
  "libfbclient.so". Check your installation.
  
  any comment ?
  
  Antonio.
  
  with the correct library name. 

Michael. 
___ 
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org

http://lists.freepascal.org/mailman/listinfo/fpc-pascal

  
  
  -- 

  

   
  


  
Antonio Fortuny
Senior Software engineer

220, avenue de la Liberté
L-4602 Niederkorn
Tel.: +352 58 00 93 - 93
www.sitasoftware.lu
  


   
  

  

  
  
  
  
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


-- 
  

  
  
  
  
 Antonio


Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
 

Re: [fpc-pascal] ibase package

2013-11-18 Thread Tony Whyman

  
  
Antonio,

Be careful on Ubuntu (as with all Debian) you only get
libfbclient.so installed when you also have the development package
(firebird-dev) installed. Better to load the libfbclient.so.2
library which gets installed with the libfclient2 package.

Regards

Tony Whyman
MWA Software

On 18/11/13 12:11, Antonio Fortuny
  wrote:


  
  
  Le 18/11/2013 13:08, Antonio Fortuny
a écrit :
  
  


Le 18/11/2013 12:19, Michael Van
  Canneyt a écrit :

 
  
  On Mon, 18 Nov 2013, Antonio Fortuny wrote: 
  
  Hi Folks. 

I'm a little bit annoyed by a boring specification in the
fpc package. When in a program I use the TIBConnection
(along witha transaction and a query), the compiled program
looks for the local libfbclient when establishing the
connection. 
So far so good. When I install the program in another Linux
box, running Firebird 2.1, the program complains that 
"Can not load default Firebird clients ("libfbclient.so.2.5"
or "libgds.so" or "libfbembed.so.2.5")". Looks normal as
this Linux box uses Firebird 2.1 
Is it possible to force what library should be used instead
? (as UIB does) 
Having a look inside the code, in ibase60 (lines 2680 and
fw) library names look fixed and looks like the Firebird
version should be fixed before using it. 
  
  
  You can do 2 things: 
  
  1. use the TSQLDBLibraryLoader component from sqldblib (in
  trunk) 
  
  2. call 
     function InitialiseIBase60(Const LibraryName : AnsiString)
  : integer; 

found it in ibase60dyn.pp --> ibase60.inc
before connecting to the DB:
    InitialiseIBase60('libfbclient.so');
  
  changing previous line to 
    InitialiseIBase60('./libfbclient.so');
  works.
  
  Thanks
  
  Antonio.
  
   compile on one system (OpenSuse x86_64), copy to
the target system (Ubuntu x86_64)
target systemp library /usr/lib/libfbclient.so.2 copied in
current directory as libfbclient.so
then run and:
An unhandled exception occurred at $004B544B :
EInOutError : Can not load Firebird client library
"libfbclient.so". Check your installation.

any comment ?

Antonio.

with the correct library name. 
  
  Michael. 
  ___ 
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
  


-- 
  

  
 

  
  
 Antonio


Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
 

  

  




___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
  
  
  -- 

  

   
  


   Antonio

  Fortuny
Senior Software engineer

220, avenue de la Liberté
L-4602 Niederkorn
Tel.: +352 58 00 93 - 93
www.sitasoftware.lu
  


   
  

  

  
  
  
  
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ibase package

2013-11-18 Thread Antonio Fortuny

  
  

Le 18/11/2013 13:12, Michael Van
  Canneyt a écrit :


  
  
  On Mon, 18 Nov 2013, Antonio Fortuny wrote:
  
  
  

Le 18/11/2013 12:19, Michael Van Canneyt a écrit :


  
  
  On Mon, 18 Nov 2013, Antonio Fortuny wrote:
  
  
  Hi Folks.


I'm a little bit annoyed by a boring specification in the
fpc package. When in a program I use the TIBConnection
(along witha transaction and a query), the compiled program
looks for the local libfbclient when establishing the
connection.

So far so good. When I install the program in another Linux
box, running Firebird 2.1, the program complains that

"Can not load default Firebird clients ("libfbclient.so.2.5"
or "libgds.so" or "libfbembed.so.2.5")". Looks normal as
this Linux box uses Firebird 2.1

Is it possible to force what library should be used instead
? (as UIB does)

Having a look inside the code, in ibase60 (lines 2680 and
fw) library names look fixed and looks like the Firebird
version should be fixed before using it.

  
  
  You can do 2 things:
  
  
  1. use the TSQLDBLibraryLoader component from sqldblib (in
  trunk)
  
  
  2. call
  
     function InitialiseIBase60(Const LibraryName : AnsiString)
  : integer;
  

found it in ibase60dyn.pp --> ibase60.inc

before connecting to the DB:

   InitialiseIBase60('libfbclient.so');

compile on one system (OpenSuse x86_64), copy to the target
system (Ubuntu x86_64)

target systemp library /usr/lib/libfbclient.so.2 copied in
current directory as libfbclient.so

then run and:

An unhandled exception occurred at $004B544B :

EInOutError : Can not load Firebird client library
"libfbclient.so". Check your installation.


any comment ?

  
  
  The current directory on linux is never searched. If you want that
  you must add a complete path.
  

Yep, I did find it myself   8-)
  
Thanks anyway Michael.


  
  Michael.
  
  
  
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


-- 
  

  
  
  
  
 Antonio
Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
  
  

  

  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ibase package

2013-11-18 Thread Michael Van Canneyt



On Mon, 18 Nov 2013, Antonio Fortuny wrote:



Le 18/11/2013 12:19, Michael Van Canneyt a écrit :



On Mon, 18 Nov 2013, Antonio Fortuny wrote:


Hi Folks.

I'm a little bit annoyed by a boring specification in the fpc package. 
When in a program I use the TIBConnection (along witha transaction and a 
query), the compiled program looks for the local libfbclient when 
establishing the connection.
So far so good. When I install the program in another Linux box, running 
Firebird 2.1, the program complains that
"Can not load default Firebird clients ("libfbclient.so.2.5" or 
"libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box uses 
Firebird 2.1
Is it possible to force what library should be used instead ? (as UIB 
does)
Having a look inside the code, in ibase60 (lines 2680 and fw) library 
names look fixed and looks like the Firebird version should be fixed 
before using it.


You can do 2 things:

1. use the TSQLDBLibraryLoader component from sqldblib (in trunk)

2. call
   function InitialiseIBase60(Const LibraryName : AnsiString) : integer;

found it in ibase60dyn.pp --> ibase60.inc
before connecting to the DB:
   InitialiseIBase60('libfbclient.so');
compile on one system (OpenSuse x86_64), copy to the target system (Ubuntu 
x86_64)
target systemp library /usr/lib/libfbclient.so.2 copied in current directory 
as libfbclient.so

then run and:
An unhandled exception occurred at $004B544B :
EInOutError : Can not load Firebird client library "libfbclient.so". Check 
your installation.


any comment ?


The current directory on linux is never searched. 
If you want that you must add a complete path.


Michael.___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ibase package

2013-11-18 Thread Antonio Fortuny

  
  

Le 18/11/2013 13:08, Antonio Fortuny a
  écrit :


  
  
  Le 18/11/2013 12:19, Michael Van
Canneyt a écrit :
  
   

On Mon, 18 Nov 2013, Antonio Fortuny wrote: 

Hi Folks. 
  
  I'm a little bit annoyed by a boring specification in the fpc
  package. When in a program I use the TIBConnection (along
  witha transaction and a query), the compiled program looks for
  the local libfbclient when establishing the connection. 
  So far so good. When I install the program in another Linux
  box, running Firebird 2.1, the program complains that 
  "Can not load default Firebird clients ("libfbclient.so.2.5"
  or "libgds.so" or "libfbembed.so.2.5")". Looks normal as this
  Linux box uses Firebird 2.1 
  Is it possible to force what library should be used instead ?
  (as UIB does) 
  Having a look inside the code, in ibase60 (lines 2680 and fw)
  library names look fixed and looks like the Firebird version
  should be fixed before using it. 


You can do 2 things: 

1. use the TSQLDBLibraryLoader component from sqldblib (in
trunk) 

2. call 
   function InitialiseIBase60(Const LibraryName : AnsiString) :
integer; 
  
  found it in ibase60dyn.pp --> ibase60.inc
  before connecting to the DB:
      InitialiseIBase60('libfbclient.so');

changing previous line to 
  InitialiseIBase60('./libfbclient.so');
works.

Thanks

Antonio.


  compile on one system (OpenSuse x86_64), copy to the target system
  (Ubuntu x86_64)
  target systemp library /usr/lib/libfbclient.so.2 copied in current
  directory as libfbclient.so
  then run and:
  An unhandled exception occurred at $004B544B :
  EInOutError : Can not load Firebird client library
  "libfbclient.so". Check your installation.
  
  any comment ?
  
  Antonio.
  
  with the correct library name. 

Michael. 
___ 
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org

http://lists.freepascal.org/mailman/listinfo/fpc-pascal

  
  
  -- 

  




   Antonio

  Fortuny
Senior Software engineer

220, avenue de la Liberté
L-4602 Niederkorn
Tel.: +352 58 00 93 - 93
www.sitasoftware.lu
  




  

  
  
  
  
  ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


-- 
  

  
  
  
  
 Antonio
Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
  
  

  

  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] ibase package

2013-11-18 Thread Antonio Fortuny

  
  

Le 18/11/2013 12:19, Michael Van
  Canneyt a écrit :


  
  
  On Mon, 18 Nov 2013, Antonio Fortuny wrote:
  
  
  Hi Folks.


I'm a little bit annoyed by a boring specification in the fpc
package. When in a program I use the TIBConnection (along witha
transaction and a query), the compiled program looks for the
local libfbclient when establishing the connection.

So far so good. When I install the program in another Linux box,
running Firebird 2.1, the program complains that

"Can not load default Firebird clients ("libfbclient.so.2.5" or
"libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux
box uses Firebird 2.1

Is it possible to force what library should be used instead ?
(as UIB does)

Having a look inside the code, in ibase60 (lines 2680 and fw)
library names look fixed and looks like the Firebird version
should be fixed before using it.

  
  
  You can do 2 things:
  
  
  1. use the TSQLDBLibraryLoader component from sqldblib (in trunk)
  
  
  2. call
  
     function InitialiseIBase60(Const LibraryName : AnsiString) :
  integer;
  

found it in ibase60dyn.pp --> ibase60.inc
before connecting to the DB:
    InitialiseIBase60('libfbclient.so');
compile on one system (OpenSuse x86_64), copy to the target system
(Ubuntu x86_64)
target systemp library /usr/lib/libfbclient.so.2 copied in current
directory as libfbclient.so
then run and:
An unhandled exception occurred at $004B544B :
EInOutError : Can not load Firebird client library "libfbclient.so".
Check your installation.

any comment ?

Antonio.

with the correct library name.
  
  
  Michael.
  
  ___
  
  fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
  
  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
  


-- 
  

  
  
  
  
 Antonio
Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
  
  

  

  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] optionally uses a unit

2013-11-18 Thread Xiangrong Fang
2013/11/18 Mark Morgan Lloyd 

> There are definitely hazards, but I think that an exists() predicate of
> some form would definitely be useful. For example, inside an {$ifdef
> persist} it would give the developers the ability to have a tailored error
> message advising the maintainer that if persists.pas didn't exist he should
> also get such-and-such a project from local svn, and set up appropriate
> symlinks.
>
> The major issue would be directories and search paths.


That's also what I want to achieve.  My original purpose is to reduce
dependencies by put non-critical functions into a separate aux unit while
make the main unit still workable without the aux unit.​​

As to the search path, I would suggest searching the current path (which
*this* unit resides in), plus the path defined in project options.  I also
suggest to disable path component in this proposed directive, i.e.:

{$ifexists some/relative/path/filename.pas} and
{$ifexists /some/absolute/path/filename.pas}

are BOTH NOT allowed, only {$ifexists filename.pas} is allowed.

I don't know if this conforms to fpc traditions or not.

As to the concern about existing ppu or .o file, I think it is not a
problem, because you just follow the normal rule to compare file datetime
of the .o and .pas file. I don't like to rely on make files as fpc has its
own building system.

Xiangrong
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: ibase package

2013-11-18 Thread Reinier Olislagers
On 18/11/2013 12:05, Antonio Fortuny wrote:
> So far so good. When I install the program in another Linux box, running
> Firebird 2.1, the program complains that
> "Can not load default Firebird clients ("libfbclient.so.2.5" or
> "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux box
> uses Firebird 2.1
> Is it possible to force what library should be used instead ? (as UIB does)
> Having a look inside the code, in ibase60 (lines 2680 and fw) library
> names look fixed and looks like the Firebird version should be fixed
> before using it.

TSQLDBLibraryLoader may help:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg29657.html

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] ibase package

2013-11-18 Thread Michael Van Canneyt



On Mon, 18 Nov 2013, Antonio Fortuny wrote:


Hi Folks.

I'm a little bit annoyed by a boring specification in the fpc package. When 
in a program I use the TIBConnection (along witha transaction and a query), 
the compiled program looks for the local libfbclient when establishing the 
connection.
So far so good. When I install the program in another Linux box, running 
Firebird 2.1, the program complains that
"Can not load default Firebird clients ("libfbclient.so.2.5" or "libgds.so" 
or "libfbembed.so.2.5")". Looks normal as this Linux box uses Firebird 2.1

Is it possible to force what library should be used instead ? (as UIB does)
Having a look inside the code, in ibase60 (lines 2680 and fw) library names 
look fixed and looks like the Firebird version should be fixed before using 
it.


You can do 2 things:

1. use the TSQLDBLibraryLoader component from sqldblib (in trunk)

2. call
   function InitialiseIBase60(Const LibraryName : AnsiString) : integer;
with the correct library name.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] ibase package

2013-11-18 Thread Antonio Fortuny

  
  
Hi Folks.
  
  I'm a little bit annoyed by a boring specification in the fpc
  package. When in a program I use the TIBConnection (along witha
  transaction and a query), the compiled program looks for the local
  libfbclient when establishing the connection.
  So far so good. When I install the program in another Linux box,
  running Firebird 2.1, the program complains that 
  "Can not load default Firebird clients ("libfbclient.so.2.5" or
  "libgds.so" or "libfbembed.so.2.5")". Looks normal as this Linux
  box uses Firebird 2.1
  Is it possible to force what library should be used instead ? (as
  UIB does)
  Having a look inside the code, in ibase60 (lines 2680 and fw)
  library names look fixed and looks like the Firebird version
  should be fixed before using it.
  
  Antonio.

-- 
  

  
  
  
  
 Antonio
Fortuny
  Senior Software engineer
  
  220, avenue de la Liberté
  L-4602 Niederkorn
  Tel.: +352 58 00 93 - 93
  www.sitasoftware.lu

  
  
  
  

  

  

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] optionally uses a unit

2013-11-18 Thread Mark Morgan Lloyd

Tomas Hajny wrote:

On Mon, November 18, 2013 07:38, Xiangrong Fang wrote:


Hi,


Is it possible to optionally use a unit? e.g.

unit myunit;
uses {$ifexists persist.pas}persist,{$endif} Classes;

type
  TMyClass = class
  public
{$ifexists persist.pas}
procedure SaveToStream(s: TStream);
{$endif}
  end;


Isn't {$IFDEF PERSIST}... combined with calling the compiler with/without
-dPERSIST depending on availability of the source sufficient (and more
general)? Obviously, you can test availability of the source file in a
makefile/shell script/batch file/... and have the -dPERSIST added to
compiler options accordingly.

BTW, your example (and partly the whole concept) might give
unexpected/unwanted results - what if a precompiled version (.ppu/.o) of
that unit is available but not the source file? Which directories should
be checked when searching the file (note that the compiler couldn't know
if the filename mentioned should belong to a unit source file, specific
include file, compiled object, library or even a completely independent
file, and that different search paths are used for searching files of
different types)?


There are definitely hazards, but I think that an exists() predicate of 
some form would definitely be useful. For example, inside an {$ifdef 
persist} it would give the developers the ability to have a tailored 
error message advising the maintainer that if persists.pas didn't exist 
he should also get such-and-such a project from local svn, and set up 
appropriate symlinks.


The major issue would be directories and search paths.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TBookmark Type Change Status Request

2013-11-18 Thread Marco van de Voort
In our previous episode, Tony Whyman said:
> Does anyone have an update on which release the TBookmark type change
> from pointer to TBytes is going to be rolled out? I have heard that it
> will not now be in 2.6.4.

That is correct. I see now that the deprecated message in the source was
never corrected. The decision was made quite some time ago, and partially
also because there was a lot more involved than I initially thought.

The same division line will also change the buffer type to Pbyte. This can
already be abstracted by using TRecordBuffer as much as possible.

> It's not that I want to use this change, I just want to set a sensible
> (and stable) bit of conditional code to cope with the change.

2.7.0 (2.7.x) is the safe version to make the break. The change happened in
trunk long ago, and anything newer will get a higher number.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] TBookmark Type Change Status Request

2013-11-18 Thread LacaK
AFAIS this change is not merged to FPC 2.6.3, so I think, that it will 
NOT be a part of 2.6.4

L.

Does anyone have an update on which release the TBookmark type change
from pointer to TBytes is going to be rolled out? I have heard that it
will not now be in 2.6.4.

It's not that I want to use this change, I just want to set a sensible
(and stable) bit of conditional code to cope with the change.

Tony Whyman
MWA Software
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

  


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] TBookmark Type Change Status Request

2013-11-18 Thread Tony Whyman
Does anyone have an update on which release the TBookmark type change
from pointer to TBytes is going to be rolled out? I have heard that it
will not now be in 2.6.4.

It's not that I want to use this change, I just want to set a sensible
(and stable) bit of conditional code to cope with the change.

Tony Whyman
MWA Software
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] optionally uses a unit

2013-11-18 Thread Tomas Hajny
On Mon, November 18, 2013 07:38, Xiangrong Fang wrote:


Hi,

> Is it possible to optionally use a unit? e.g.
>
> unit myunit;
> uses {$ifexists persist.pas}persist,{$endif} Classes;
>
> type
>   TMyClass = class
>   public
> {$ifexists persist.pas}
> procedure SaveToStream(s: TStream);
> {$endif}
>   end;

Isn't {$IFDEF PERSIST}... combined with calling the compiler with/without
-dPERSIST depending on availability of the source sufficient (and more
general)? Obviously, you can test availability of the source file in a
makefile/shell script/batch file/... and have the -dPERSIST added to
compiler options accordingly.

BTW, your example (and partly the whole concept) might give
unexpected/unwanted results - what if a precompiled version (.ppu/.o) of
that unit is available but not the source file? Which directories should
be checked when searching the file (note that the compiler couldn't know
if the filename mentioned should belong to a unit source file, specific
include file, compiled object, library or even a completely independent
file, and that different search paths are used for searching files of
different types)?

Tomas


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal