Console App in Kylix

Garby

Member
Hi there,

i want to develop a console application in Kylix 3. Whenever i want to run the executable file in a console there appears this exception: undefined symbol: initPAnsiStrings.
This is only if i include the units Oracle, OracleDate aso.

If i run the program in the IDE it works fine.

Is there no possibility to run your Components in a console program or is the problem on my linux system?

thanks Garby
 
Ok, the Connection works in the IDE.
If i want to run the ConsoleProgram in a Terminal Window, the exception "could not locate oci dll" appears. In the console i get this message: cannot connect to X server.

The ORACLE_HOME and ORACLE_OWNER Variables were set. ORACLE_HOME/bin is added to the PATH Variable.

Thanks for helping.

Garby
 
I had to add the Oracle library path to the
LD_LIBRARY_PATH= Variable to get console applications to work with oracle.

Lars
 
I have checked my variables again and the only additional thing is that i have the /home/oracle/lib in the path also.

By the way i think that you made only a typing error with "LD_LIBRARY_PATCH" there is an extra "C" in what you posted here.

Yes Kylix needs some Patches but it is still a "PATH". ;)

Lars
 
It works now in the Terminal Window, but in the console appears the message cannot connect to X server.

In the uses section there are 3 units: SysUtils, Oracle, OracleData;

any Ideas?

thanks
Garby
 
Ok all works fine now (even in the console) except one thing.
The console program runs only when a X Server is started. Is this the standard behavior or is somthing wrong with my system?

thanks
Garby
 
I'm not sure if this is standard behavior.

To remove all dependencies with X, you would need to recompile the Direct Oracle Access package with the NONVISUAL compiler directive set. This requires the sourcecode though.
 
Hi,
it is not possible for me to compile the Package.
there are too many ErrorMessages.

I am Using DOA 4.0.3.0

Garby
 
Hi,

The errors I received when trying to recompile using the NONVISUAL conditional define were:-
- [Error] OracleNavigator.pas(577): Incompatible types: 'OracleVisual.TMsgDlgBtn' and 'QDialogs.TMsgDlgBtn'
- [Error] OracleNavigator.pas(625): Duplicate case label

Thanks

Jeff
 
OracleNavigator.pas should not be compiled. It is not referenced in any of the other Direct Oracle Access unit, and should not be referenced in your application either.

I just noticed that you tried to compile the Direct Oracle Access package. You should not do so. The package should stay as it is, NONVISUAL should be defined in your project, and the Direct Oracle Access source files should be included in the search path of the project.
 
You're dead right, I was trying to recompile the Direct Oracle Access package. It all makes sense now.

I have now put NONVISUAL as a conditional define in my project and included the oracle source dir in my search path and everything works fine now.

Thanks

Jeff
 
Back
Top