Linking shared HCL
OneDB general
libraries to an ESQL/C module
About this task
To link shared HCL OneDB™ general
libraries to an ESQL/C module:
Procedure
- Set the environment variable that specifies the library
search path at run time so that it includes the $ONEDB_HOME/lib and $ONEDB_HOME/lib/esql paths
on a UNIX™ operating system;
and %ONEDB_HOME%lib in a Windows™ environment.
On many UNIX operating systems, the
LD_LIBRARY_PATH environment
variable specifies the library search path. The following command
sets
LD_LIBRARY_PATH in a C shell:
setenv LD_LIBRARY_PATH $ONEDB_HOME/lib:$ONEDB_HOME/
lib/esql:/usr/lib
In Windows environments, use the following command:
set LIB = %ONEDB_HOME%\lib\;%LIB%
- Compile your program with the esql command.
To link shared
HCL
OneDB general
libraries with the module,
you do not need to specify a command-line option. links
shared libraries by default. The following command compiles the
file.ec source
file with shared
HCL
OneDB libraries:
esql file.ec -o file.exe
Results
The esql command also uses the symbolic
name when it links the thread-safe shared HCL
OneDB general
libraries with the application.
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.