Specify the following options when compiling applications:
Linux
Architecture | Option | How to specify the option |
---|---|---|
32-bit | Path of the include file | -I/opt/symfoclient32/include |
Path of the library | -L/opt/symfoclient32/lib | |
64-bit | Path of the include file | -I/opt/symfoclient64/include |
Path of the library | -L/opt/symfoclient64/lib |
Type of library | Library name |
---|---|
Dynamic library | libpq.so |
Static library | libpq.a |
Example
The following are examples of compiling an application dynamically linking with the C library:
Linux 64-bit
> gcc -I/opt/symfoclient64/include -L/opt/symfoclient64/lib -lpq testproc.c -o testproc
Linux 32-bit
> gcc -I/opt/symfoclient32/include -L/opt/symfoclient32/lib -lpq testproc.c -o testproc
Windows
Architecture | Option | How to specify the option |
---|---|---|
32-bit | Path of the include file |
|
Path of the library |
| |
64-bit | Path of the include file | %ProgramFiles%\Fujitsu\symfoclient64\include |
Path of the library | %ProgramFiles%\Fujitsu\symfoclient64\lib |
Type of library | Library name |
---|---|
Library for links | libpq.lib |
Dynamic library | libpq.dll |
Example
Using the cl command
The following is an example of compiling a 32-bit application using the cl command on a 64-bit operating system:
> SET LIB=%ProgramFiles(x86)%\Fujitsu\symfoclient32\lib;%LIB% > SET INCLUDE=%ProgramFiles(x86)%\Fujitsu\symfoclient32\include;%INCLUDE% > cl test.c libpq.lib
Using the Visual Studio 2010 GUI
This explains example settings for using the GUI in Visual Studio 2010 to create applications.
Select a project in the [Solution Explorer].
Open the Property Pages by clicking [View] >> [Properties page].
In [Configuration Properties] >> [C/C++] >> [General] >> [Additional Include Directories], set the directory where the include file is specified.
In [Configuration Properties] >> [Linker] >> [Input] >> [Additional Dependencies], add "libpq.lib".
In [Configuration Properties] >> [Linker] >> [General] >> [Additional Library Directories], set the directory where the "libpq.lib" is installed.