Sunday, November 9, 2008

Get Started with...

Commands for PostgreSQL:
connect to the database: psql -d -U
list databases: psql -l
list tablespaces: \db
list all the tables: \d
create schema: create schema
create table: create table
How to write an application in C:
1) you will need a C compiler
2) you will need a make , a tool which actually invokes compiler ( and linker ).
C API consists of two components:
1) a set of header files
This contains data type definitions and function prototype. In other words, the header files describe the API to C compiler.
2) an object code library
This contains actual implementation for each function contained in the API.

So when you use a library, you have to include the lib*.h header file within your c code( using #include directive). You will also need to link your program against the object library.

How to load a library:
sudo gedit /etc/ld.so.conf
sudo ldconfig

No comments: