Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

problem use c for API

528215Aug 15 2006 — edited Aug 16 2006
Hi
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2006
Added on Aug 15 2006
2 comments
816 views