Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-04

Zeosdbo

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Terry A. Haimann

I'm sure its possible to connect to Mysql with Zeosdbo from a command line FreePascal Program, but I am not sure how. I tried using the same includes that are for the Lazarus components, but it didn't find those files.

Any help would be appreciated.

Michael Van Canneyt
to Terry A. Haimann
Terry A. Haimann wrote 6 lines
I'm sure its possible to connect to Mysql with Zeosdbo from a command line FreePascal Program, but I am not sure how. I tried using the same includes that are for the Lazarus components, but it didn't find those files. Any help would be appreciated.

What are the errors you are getting ?
Lazarus packages (I'm assuming you use a zeos package) add lots of options to the command-line compiler, most notably -Fu and -Fi options, you should at least mimic those if you compile on the command-line.

It's also perfectly possible to create command-line programs in lazarus, and compile them on the command-line using lazbuild. I use that technique myself for automated builds, and it works like a charm.

Michael.

Graeme Geldenhuys
to Terry A. Haimann: I'm sure its possible to connect to Mysql with Zeosdbo from a command line FreePascal…
Terry A. Haimann wrote
I'm sure its possible to connect to Mysql with Zeosdbo from a command line FreePascal Program, but I am not sure how.

Here is a build script I use to compile tiOPF's test suite. In part it includes compiling Zeos for connecting to MySQL and Firebird.

================================================== #!/bin/sh
# Build script for tiOPF's Console Test Runner using 64-bit Free Pascal Compiler

BASEDIR="/data/devel"
TARGET="x86_64-freebsd"
TIOPF="$BASEDIR/tiopf_dailybuilds/tiopf"
FBLIB="$BASEDIR/tiopf_dailybuilds/fblib/src"
ZEOS="$BASEDIR/opensource/zeos_svn"
FPTEST="$BASEDIR/fptest"
FPC="$BASEDIR/fpc-2.6.4/$TARGET/bin/ppcx64"

$FPC -S2cgi -O1 -gl -ve -l \
-FU$TIOPF/Compilers/FPC/lib/$TARGET/ \
-Fu$FBLIB \
-Fi$FBLIB \
-Fu$ZEOS/src/core \
-Fu$ZEOS/src/component \
-Fu$ZEOS/src/dbc \
-Fu$ZEOS/src/parsesql \
-Fu$ZEOS/src/plain \
-Fu$ZEOS/packages/lazarus/ \
-Fi$TIOPF/Core/ \
-Fu$TIOPF/Core/ \
-Fu$TIOPF/Options/ \
-Fi$TIOPF/Core/ \
-Fu$TIOPF/UnitTests/Common/ \
-Fu$TIOPF/UnitTests/Tests/ \
-Fu$FPTEST/src/ \
-Fu$FPTEST/3rdparty/epiktimer/ \
-Fu. \
-o$TIOPF/Compilers/FPC/tiOPFUnitTestsConsole \
-dDUNIT2 -dXMLLISTENER \
-dLINK_CSV -dLINK_TAB -dLINK_XMLLIGHT \
-dLINK_SQLDB_IB -dLINK_FBL -dLINK_ZEOS_FB -dLINK_ZEOS_MYSQL50 \ -dUseCThreads \
$TIOPF/Compilers/FPC/tiOPFUnitTestsConsole.lpr
==================================================

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/