problem use c for API
528215Aug 15 2006 — edited Aug 16 2006Hi
i use berkeley db .my operating system is unix freebsd and c for api.
i use gcc compiler for compile program.
my program is like this
#include <db.h>
#include <stdio.h>
int main()
{
DB *dbp ;
u_int32_t flags;
int ret;
ret =db_create(&dbp, NULL,0);
//if (ret != 0) {
//}
flags = DB_CREATE;
ret = dbp->open(dbp,NULL,"test.db", NULL,DB_BTREE,0,0);
if (ret != 0) {
printf("error occured");
}
}
---------------------
but when i compile this program diplay this error:
------------------------------
undefined reference to `db_create'
------------------------------
please help me.
if i need to use other compiler or install other software for run c program please say me