Re: [fpc-pascal] INSTALL_PREFIX, INSTALL_LIBDIR

2018-10-19 Thread Christo Crause
On Fri, 19 Oct 2018, 16:40 christo,  wrote:

> On 2018/10/18 09:26, Mattias Gaertner via fpc-pascal wrote:
> > How to control where 'make install' puts the libraries (e.g.
> > libpas2js.so)?
> >
> > I tried "INSTALL_LIBDIR=~/tmp/lib64", but that moves everything *except*
> > libraries to "~/tmp/lib64".
> >
> > See bug https://bugs.freepascal.org/view.php?id=34346
>
> In trunk (rev. 39838):
>
> "make info FPC=[path to ppcx64]" gives:
>

Hang on, the packages and utilities are installed with fpmake, so one also
has to figure out how fpmake handles the - - prefix and - - baseinstalldir
parameters...

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

[fpc-pascal] Cannot use SQLite 64 bit dll

2018-10-19 Thread Dennis
Using Lazarus and FPC and sqlite3conn unit, I can use the sqlite3.dll on 
windows without problem.


However, when I try to convert my project to win 64, it just fail 
without any warning.


I am using
    FPC 3.1.1 Revision 63034
    Lazarus 1.9.0
    both are Win64

I download the win 64 bit version of sqlite3.dll from
https://www.sqlite.org/2018/sqlite-dll-win64-x64-3250200.zip
and place it in the same folder as my exe.

The project compiles without errors nor warning.

But when I run the exe, it just waits a few seconds and then quits silently.

I tried debugging it and set breakpoints at all of  the following in 
sqlite3.inc

function TryInitializeSqlite(const LibraryName: UnicodeString): Integer;
function InitialiseSQLite:integer;
function  InitializeSQLiteANSI(const LibraryName: AnsiString):integer;
function  InitializeSQLite(const LibraryName: UnicodeString) :integer;
function  InitialiseSQLite(const LibraryName: UnicodeString):integer;

and the following in SQLite3Conn:
class function TSQLite3ConnectionDef.DefaultLibraryName: string;
class function TSQLite3ConnectionDef.LoadedLibraryName: string;
class function TSQLite3ConnectionDef.LoadFunction: TLibraryLoadFunction;

However, the debugger did not stop at all at any of them.

What could possibly be the cause of the problem?

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

[fpc-pascal] Default properties first draft

2018-10-19 Thread Ryan Joseph
I finally finished what I think is first draft of default properties. Since it 
already took me so much time to just get the basics of the compiler figured out 
I thought I’d post this commit from GitHub and ask if I did anything seriously 
wrong or stupid. There are multiple ways I could approach this problem but I 
may have not achieved it a proper way considering the architecture of the 
compiler, which I admittedly don’t understand well.

How should I present for consideration at this stage? If anyone on the compiler 
team can look at the commit to tell me anything that would be helpful, or let 
me know if you need this in some other form that you could actually compile (I 
understand the compiler uses svn but I only know git). I have some demos of the 
basics mostly working but I have questions/problems I wasn’t able to solve on 
my own.

https://github.com/genericptr/freepascal/commit/e2992620e2e85d1100f60d13472571b8ebbf0bac

Here’s an example test in case people forgot what this was about.

==

program default_property_test_16;
uses
fgl;

type
generic TAuto = record
m_object: T;
property obj: T read m_object; default;
class operator Initialize(var a: TAuto);
class operator Finalize(var a: TAuto);
  end;

type
  TObjectAuto = specialize TAuto;
  TStringList = specialize TFPGList;
  TStringListAuto = specialize TAuto;

class operator TAuto.Initialize(var a: TAuto);
begin
  a.m_object := T.Create;
end;

class operator TAuto.Finalize(var a: TAuto);
begin
  a.m_object.Free;
end;

var
list: TStringListAuto;
str: string;
i: integer;
begin
list.Add('foo');
list.Add('bar');
for str in list do
writeln(str);
for i := 0 to list.count - 1 do
writeln(list[i]);
end.

Regards,
Ryan Joseph

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

Re: [fpc-pascal] INSTALL_PREFIX, INSTALL_LIBDIR

2018-10-19 Thread christo

On 2018/10/18 09:26, Mattias Gaertner via fpc-pascal wrote:

How to control where 'make install' puts the libraries (e.g.
libpas2js.so)?

I tried "INSTALL_LIBDIR=~/tmp/lib64", but that moves everything *except*
libraries to "~/tmp/lib64".

See bug https://bugs.freepascal.org/view.php?id=34346


In trunk (rev. 39838):

"make info FPC=[path to ppcx64]" gives:

Install base dir. /usr/local/lib/fpc/3.3.1
Install binary dir... /usr/local/bin
Install library dir.. /usr/local/lib
Install units dir /usr/local/lib/fpc/3.3.1/units/x86_64-linux/fpc

"make info INSTALL_PREFIX=/xxx FPC=[path to ppcx64]" gives:

Install base dir. /xxx/lib/fpc/3.3.1
Install binary dir... /xxx/bin
Install library dir.. /xxx/lib
Install units dir /xxx/lib/fpc/3.3.1/units/x86_64-linux/fpc

"make info INSTALL_PREFIX=/xxx INSTALL_LIBDIR=/yyy FPC=[path to ppcx64]" 
gives:


Install base dir. /xxx/lib/fpc/3.3.1
Install binary dir... /xxx/bin
Install library dir.. /yyy
Install units dir /xxx/lib/fpc/3.3.1/units/x86_64-linux/fpc

This seems different to your case.  Which version of FPC are you using?

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