minimal database example

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

minimal database example

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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: minimal database example

leledumbo
Administrator
> 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.