|
|
|
|
This section summarizes the information you need to consider when developing applications for use in the Solaris environment.
The header file to be used with CSV applications is /usr/include/sna/acssvcc.h. This file contains the definitions of the CSV entry points and verb control blocks. It also includes the common interface header file /usr/include/sna/values_c.h, which contains the constants defined for supplied and returned parameter values at the CSV interface.
The SNAP-IX CSV library supports multithreaded applications. The only restrictions are as follows:
Only one verb can be outstanding at any time. A verb will fail with the return codes AP_STATE_CHECK and AP_SYNC_PENDING if another verb is in progress.
The application must perform any required clean-up processing before a thread terminates. The CSV library does not maintain any correlation between threads and verb usage, and will not perform this processing automatically when a thread terminates.
Do not attempt to use multithreaded applications with a version of the library that does not support DCE threads.
When compiling your CSV application, use the following options:
Indicates the directory containing one or more header files your application requires.
Specifies use of the sparcv9 (64-bit) architecture instruction set. Use this option if you want to compile the application in 64-bit mode. To compile in 32-bit mode, do not specify this option.
When linking your CSV application, use the following options:
Specifies use of the sparcv9 (64-bit) architecture instruction set. Use this option if you want to link the application in 64-bit mode. To link in 32-bit mode, do not specify this option.
Indicates the directory containing one or more libraries to be used when linking the application.
This directory is normally /opt/sna/lib, except for 64-bit applications where it is /opt/sna/lib/sparcv9.
Indicates the name of a library to be used when linking the application.
Indicates the directory containing one or more libraries to be used by the application at run time.
This directory is normally /opt/sna/lib, except for 64-bit applications where it is /opt/sna/lib/sparcv9.
As an alternative to the option, you can set the
environment variable
Indicates a preprocessor directive to be used by the compiler. Do not include any space between and the name of the preprocessor directive.
The command you use to link the application depends on which type of application it is, as described below.
For a 64-bit application, link with the following options:
-xarch=v9 -L /opt/sna/lib/sparcv9 -R /opt/sna/lib/sparcv9 -lcsv -lsna
For a 32-bit application, link with the following options:
-L /opt/sna/lib -R /opt/sna/lib -lcsv -lsna
If you are using the standard Solaris compiler /usr/ucb/cc, you may encounter compiler errors indicating that the library libucb.so.1 could not be found. If this occurs, add /usr/ucblib to the compiler options you use to link the program.
Check your Motif documentation for information on which libraries and other options are required to link your Motif application.
For Solaris, a multithreaded application can use either Solaris threads or POSIX threads. Refer to the Solaris Programmer's Guide for multithreaded programs for more information on using each type of threads. The following options are suitable for linking most applications:
-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -L /opt/sna/lib -R /opt/sna/lib -lcsv -lsna_r -lthread
For a 64-bit application, link with the following options:
-xarch=v9 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -L /opt/sna/lib/sparcv9 -R /opt/sna/lib/sparcv9 -lcsv -lsna_r -lthread
If you are using the standard Solaris compiler /usr/ucb/cc , you may encounter compiler errors indicating that the library libucb.so.1 could not be found. If this occurs, add /usr/ucblib to the compiler options you use to link the program.
|
|
|
|
|