Sign in Join

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

Mailing lists / fpc-pascal / 2018-02

Trying to compile ZeosDBO cli program

7 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

First of all, thank you for looking at this, Terry H.

To compile a cli FreePascal program to use ZeosDBO library, I assume all I have to do is include the path to those files.

On my laptop, the files appear to be in:

/home/terry/ZeosDBO/packages/lazarus/lib/x86_64-linux

Well after adding that to the path and put ZConnection in the uses clause, it comes up with a "Can't find unit ZConnection"

At least a directory of that gives me these files:

ZAbstractConnection.o ZDbcASA.o
ZDbcInterbase6ResultSet.ppu ZDbcPooled.o ZEncoding.ppu ZMatchPattern.ppu ZPlainLoader.o ZSqlMetadata.o
ZAbstractConnection.ppu ZDbcASA.ppu
ZDbcInterbase6Statement.o ZDbcPooled.ppu ZExpression.o ZMessages.o ZPlainLoader.ppu ZSqlMetadata.ppu
ZAbstractDataset.o ZDbcASAResultSet.o
ZDbcInterbase6Statement.ppu ZDbcPostgreSqlMetadata.o ZExpression.ppu ZMessages.ppu
ZPlainMySqlConstants.o ZSqlMonitor.o
ZAbstractDataset.ppu ZDbcASAResultSet.ppu
ZDbcInterbase6Utils.o ZDbcPostgreSqlMetadata.ppu ZExprParser.o ZMessages.rsj ZPlainMySqlConstants.ppu ZSqlMonitor.ppu
ZAbstractRODataset.o ZDbcASAStatement.o
ZDbcInterbase6Utils.ppu ZDbcPostgreSql.o
ZExprParser.ppu ZMySqlAnalyser.o
ZPlainMySqlDriver.o ZSqlProcessor.o
ZAbstractRODataset.ppu ZDbcASAStatement.ppu ZDbcIntfs.o ZDbcPostgreSql.ppu ZExprToken.o ZMySqlAnalyser.ppu ZPlainMySqlDriver.ppu ZSqlProcessor.ppu
ZAbstractTable.o ZDbcASAUtils.o ZDbcIntfs.ppu ZDbcPostgreSqlResultSet.o ZExprToken.ppu ZMySqlToken.o zplain.o ZSqlStrings.o
ZAbstractTable.ppu ZDbcASAUtils.ppu ZDbcLogging.o ZDbcPostgreSqlResultSet.ppu ZFunctionsConvert.o ZMySqlToken.ppu ZPlainOracleConstants.o ZSqlStrings.ppu
ZClasses.o ZDbcCachedResultSet.o ZDbcLogging.ppu ZDbcPostgreSqlStatement.o ZFunctionsConvert.ppu ZOracleAnalyser.o ZPlainOracleConstants.ppu ZSqlUpdate.o
ZClasses.ppu ZDbcCachedResultSet.ppu ZDbcMetadata.o ZDbcPostgreSqlStatement.ppu ZFunctionsDateTime.o
ZOracleAnalyser.ppu ZPlainOracleDriver.o ZSqlUpdate.ppu
ZCollections.o ZDbcCache.o ZDbcMetadata.ppu ZDbcPostgreSqlUtils.o ZFunctionsDateTime.ppu ZOracleToken.o ZPlainOracleDriver.ppu ZStoredProcedure.o
ZCollections.ppu ZDbcCache.ppu ZDbcMySqlMetadata.o ZDbcPostgreSqlUtils.ppu ZFunctionsMath.o ZOracleToken.ppu ZPlainPostgreSqlDriver.o ZStoredProcedure.ppu
ZCompatibility.o zdbc.compiled
ZDbcMySqlMetadata.ppu zdbc.ppu
ZFunctionsMath.ppu zparsesql.compiled
ZPlainPostgreSqlDriver.ppu ZStreamBlob.o
ZCompatibility.ppu ZDbcConnection.o ZDbcMySql.o ZDbcResultSetMetadata.o ZFunctions.o zparsesql.o zplain.ppu ZStreamBlob.ppu
zcomponent.compiled ZDbcConnection.ppu ZDbcMySql.ppu ZDbcResultSetMetadata.ppu ZFunctionsOther.o zparsesql.ppu ZPlainSqLiteDriver.o ZSybaseAnalyser.o
zcomponent.o ZDbcDbLibMetadata.o
ZDbcMySqlResultSet.o ZDbcResultSet.o
ZFunctionsOther.ppu ZPgEventAlerter.o
ZPlainSqLiteDriver.ppu ZSybaseAnalyser.ppu
zcomponent.ppu ZDbcDbLibMetadata.ppu
ZDbcMySqlResultSet.ppu ZDbcResultSet.ppu ZFunctions.ppu ZPgEventAlerter.ppu ZPostgreSqlAnalyser.o ZSybaseToken.o
ZComponentReg.o ZDbcDbLib.o
ZDbcMySqlStatement.o ZDbcSqLiteMetadata.o
ZFunctionsStrings.o ZPlainASAConstants.o
ZPostgreSqlAnalyser.ppu ZSybaseToken.ppu
ZComponentReg.ppu ZDbcDbLib.ppu
ZDbcMySqlStatement.ppu ZDbcSqLiteMetadata.ppu ZFunctionsStrings.ppu ZPlainASAConstants.ppu
ZPostgreSqlToken.o ZSysUtils.o
ZConnectionGroup.o ZDbcDbLibResultSet.o ZDbcMySqlUtils.o ZDbcSqLite.o ZGenericSqlAnalyser.o ZPlainASADriver.o ZPostgreSqlToken.ppu ZSysUtils.ppu
ZConnectionGroup.ppu ZDbcDbLibResultSet.ppu ZDbcMySqlUtils.ppu ZDbcSqLite.ppu ZGenericSqlAnalyser.ppu ZPlainASADriver.ppu ZPropertyEditor.o ZTokenizer.o
ZConnection.o ZDbcDbLibStatement.o zdbc.o ZDbcSqLiteResultSet.o ZGenericSqlToken.o zplain.compiled ZPropertyEditor.ppu ZTokenizer.ppu
ZConnection.ppu ZDbcDbLibStatement.ppu
ZDbcOracleMetadata.o ZDbcSqLiteResultSet.ppu ZGenericSqlToken.ppu ZPlainDbLibConstants.o
ZScriptParser.o ZUpdateSqlEditor.o
zcore.compiled ZDbcDbLibUtils.o
ZDbcOracleMetadata.ppu ZDbcSqLiteStatement.o ZGroupedConnection.o ZPlainDbLibConstants.ppu
ZScriptParser.ppu ZUpdateSqlEditor.ppu
zcore.o ZDbcDbLibUtils.ppu ZDbcOracle.o ZDbcSqLiteStatement.ppu ZGroupedConnection.ppu ZPlainDbLibDriver.o ZSelectSchema.o ZUpdateSqlEditor.rsj
zcore.ppu ZDbcGenericResolver.o ZDbcOracle.ppu ZDbcSqLiteUtils.o ZIBEventAlerter.o
ZPlainDbLibDriver.ppu ZSelectSchema.ppu ZURL.o ZDataset.o ZDbcGenericResolver.ppu
ZDbcOracleResultSet.o ZDbcSqLiteUtils.ppu
ZIBEventAlerter.ppu ZPlainDriver.o
ZSequence.o ZURL.ppu
ZDataset.ppu ZDbcInterbase6Metadata.o
ZDbcOracleResultSet.ppu ZDbcStatement.o
ZInterbaseAnalyser.o ZPlainDriver.ppu
ZSequence.ppu ZVariables.o
ZDatasetUtils.o ZDbcInterbase6Metadata.ppu ZDbcOracleStatement.o ZDbcStatement.ppu
ZInterbaseAnalyser.ppu ZPlainFirebirdDriver.o
ZSqLiteAnalyser.o ZVariables.ppu
ZDatasetUtils.ppu ZDbcInterbase6.o
ZDbcOracleStatement.ppu ZDbcUtils.o
ZInterbaseToken.o ZPlainFirebirdDriver.ppu
ZSqLiteAnalyser.ppu ZVariant.o
ZDbcASAMetadata.o ZDbcInterbase6.ppu ZDbcOracleUtils.o ZDbcUtils.ppu ZInterbaseToken.ppu
ZPlainFirebirdInterbaseConstants.o ZSqLiteToken.o ZVariant.ppu
ZDbcASAMetadata.ppu ZDbcInterbase6ResultSet.o ZDbcOracleUtils.ppu ZEncoding.o ZMatchPattern.o
ZPlainFirebirdInterbaseConstants.ppu ZSqLiteToken.ppu

Reply by email

stdreamer
to Terry A. Haimann
Terry A. Haimann wrote 12 lines
First of all, thank you for looking at this, Terry H. To compile a cli FreePascal program to use ZeosDBO library, I assume all I have to do is include the path to those files. On my laptop, the files appear to be in: /home/terry/ZeosDBO/packages/lazarus/lib/x86_64-linux Well after adding that to the path and put ZConnection in the uses clause, it comes up with a "Can't find unit ZConnection"

you do not add the path (remove it) you add the ZeosDBO package to your required packages. Open the project inspector and select add new requirement. that will sort the file not found out for you.

Reply by email

Terry A. Haimann

I really do not understand your response. If you are talking about Lazarus, I already have it working there. I am wanting to get it to work from a command line batch program using fpc. Using fpc I do not know how to set required packages and from fpc I do not know where a Project Inspector would be.

Mostly, at this point,I want to compare ZeosDBO's performance against SqlDB. I know how to do this with SqlDB, but think it's performance is lackluster.

Terry H

Terry A. Haimann wrote
First of all, thank you for looking at this, Terry H. To compile a cli FreePascal program to use ZeosDBO library, I assume

all

Show quoted text 9 lines
I have to do is include the path to those files. On my laptop, the files appear to be in: /home/terry/ZeosDBO/packages/lazarus/lib/x86_64-linux Well after adding that to the path and put ZConnection in the uses clause, it comes up with a "Can't find unit ZConnection"

you do not add the path (remove it) you add the ZeosDBO package to your required packages. Open the project inspector and select add new requirement. that will sort the file not found out for you.

Reply by email

stdreamer
to Terry A. Haimann
Terry A. Haimann wrote
I really do not understand your response. If you are talking about Lazarus, I already have it working there.

OK

I am wanting to get it to work from a command line batch program using fpc. Using fpc I do not know how to set required packages and from fpc I do not know where a Project Inspector would be.

Oh! I assumed that the cli application was edited from lazarus in that case add the folder where the code is to your path not the compiled binaries. I Assume something along the lines of
/home/terry/ZeosDBO/src/plain
/home/terry/ZeosDBO/src/
/home/terry/ZeosDBO/src/component
/home/terry/ZeosDBO/src/core
/home/terry/ZeosDBO/src/dbc
/home/terry/ZeosDBO/src/parsesql

Reply by email

Terry A. Haimann

I tried adding the following to my path:

/home/terry/ZeosDBO/src/plain
/home/terry/ZeosDBO/src/
/home/terry/ZeosDBO/src/component
/home/terry/ZeosDBO/src/core
/home/terry/ZeosDBO/src/dbc
/home/terry/ZeosDBO/src/parsesql

And when I try to coompile, it is still saying:
Can't find Unit Zconnection

I only added the paths in temporarily.

Terry A. Haimann wrote
I really do not understand your response. If you are talking about Lazarus, I already have it working there.

OK

I am wanting to get it to work from a command line batch program using fpc. Using fpc I do not know how to set required packages and from fpc I do not know where a Project Inspector would be.

Oh! I assumed that the cli application was edited from lazarus in that case add the folder where the code is to your path not the compiled binaries. I Assume something along the lines of
/home/terry/ZeosDBO/src/plain
/home/terry/ZeosDBO/src/
/home/terry/ZeosDBO/src/component
/home/terry/ZeosDBO/src/core
/home/terry/ZeosDBO/src/dbc
/home/terry/ZeosDBO/src/parsesql

Reply by email

Terry A. Haimann

Never mind I have it figured out. You have to add the path to the /etc/fpc.cfg file, such as:

-Fu/home/user/ZeosDBO/packages/lazarus/lib/x86_64-linux

I remembered we do something like this years ago with an older mysql library.

Terry H.

I tried adding the following to my path:

/home/terry/ZeosDBO/src/plain
/home/terry/ZeosDBO/src/
/home/terry/ZeosDBO/src/component
/home/terry/ZeosDBO/src/core
/home/terry/ZeosDBO/src/dbc
/home/terry/ZeosDBO/src/parsesql

And when I try to coompile, it is still saying:
Can't find Unit Zconnection

I only added the paths in temporarily.

Terry A. Haimann wrote
I really do not understand your response. If you are talking about Lazarus, I already have it working there.

OK

I am wanting to get it to work from a command line batch program using fpc. Using fpc I do not know how to set required packages and from fpc I do not know where a Project Inspector would be.

Oh! I assumed that the cli application was edited from lazarus in that case add the folder where the code is to your path not the compiled binaries. I Assume something along the lines of
/home/terry/ZeosDBO/src/plain
/home/terry/ZeosDBO/src/
/home/terry/ZeosDBO/src/component
/home/terry/ZeosDBO/src/core
/home/terry/ZeosDBO/src/dbc
/home/terry/ZeosDBO/src/parsesql

Reply by email