![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
cc -O -c gettingstarted_common.c cc -O -c example_database_load.c cc -L $HOME/db-4.5.20/build_unix/.libs/ -o example_database_load |
|
I suspected the example first and ran a much much simpler one. Still gives me seg. faults, the simpler example is like the following: #include "db.h" #define DATABASE "access.db" int main() { DB *dbp; DBT key, data; int ret, t_ret; /* Create the database handle and open the underlying database. */ fprintf (stderr,"test 1"); if ((ret = db_create(&dbp, NULL, 0)) != 0) { fprintf(stderr, "db_create: %s\n", db_strerror(ret)); exit (1); } fprintf(stderr,"test 2"); if ((ret = dbp->open(dbp,NULL, DATABASE, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) { dbp->err(dbp, ret, "%s", DATABASE); goto err; } fprintf(stderr,"test 3"); .... } That never achieves to print "test 3" |
![]() |
| Thread Tools | |
| Display Modes | |
| |