[fpc-pascal] minimal database example

2016-12-16 Thread duilio foschi
I have a remote server with Ubuntu 14.04.1 LTS.

I access the server via terminal console.

Free Pascal Compiler version 2.6.2-8 [2014/01/22] for x86_64 is installed.

Lazarus is NOT installed.

I'd like to write code where a Firebird (2.5) database is accessed and
a query performed.

I could successfully unzip the Zeos source code into directory /usr/lib/zeos.

However it is not clear to me how this source code can be used by fpc.

I added the zeos path to the fpc.cfg file, but I get a number of
compilation error.

For instance
Fatal: Can't open include file "../Zeos.inc"

With Lazarus I would build a package and all zeos components would be
immediately available for my programs.

What happens when only FPC is at hand ?

Is FPC the child of a Lesser God ? :)

Reason wants that somehow FPC can use zeos source code.

Any help ?

Thank you

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


Re: [fpc-pascal] minimal database example

2016-12-16 Thread leledumbo
> However it is not clear to me how this source code can be used by fpc. 
> 
> I added the zeos path to the fpc.cfg file, but I get a number of 
> compilation error. 
> 
> For instance 
> Fatal: Can't open include file "../Zeos.inc" 
> 
> With Lazarus I would build a package and all zeos components would be 
> immediately available for my programs. 

Open the package->Options->Show Options, that's the list of compiler options
you must pass when building the package without Lazarus by compiling the
registration unit (the one has the same name as the .lpk, but with .pas /
.pp extension). The unit itself might not be useful without Lazarus, but it
helps building the whole package as it has all the units as dependency. When
done, add -Fu to the package's compiled units directory when compiling your
program.

> What happens when only FPC is at hand ?

You can no longer close your eyes to what happens under the hood behind
Lazarus -> FPC communication.

> Is FPC the child of a Lesser God ? :)

Quite the contrary, FPC can live by itself, Lazarus is dead without it.




--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/minimal-database-example-tp5727126p5727127.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal