Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7093559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:27:16+00:00 2026-05-28T08:27:16+00:00

I am trying to execute the berkeleyDB examples. I installed BDB with a make

  • 0

I am trying to execute the berkeleyDB examples. I installed BDB with a make and make install. In the examples/c directory, I do a gcc ex_*.c, for any example, and the following is what I get. Am I going about this the right way?

ex_access.c: In function ‘main’:
ex_access.c:34: error: ‘DBC’ undeclared (first use in this function)
ex_access.c:34: error: (Each undeclared identifier is reported only once
ex_access.c:34: error: for each function it appears in.)
ex_access.c:34: error: ‘dbcp’ undeclared (first use in this function)
ex_access.c:64: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘int’
ex_access.c:67: error: ‘DB’ has no member named ‘set_errfile’
ex_access.c:68: error: ‘DB’ has no member named ‘set_errpfx’
ex_access.c:69: error: ‘DB’ has no member named ‘set_pagesize’
ex_access.c:70: error: ‘DB’ has no member named ‘err’
ex_access.c:73: error: ‘DB’ has no member named ‘set_cachesize’
ex_access.c:74: error: ‘DB’ has no member named ‘err’
ex_access.c:77: error: ‘DB’ has no member named ‘open’
ex_access.c:78: error: ‘DB_CREATE’ undeclared (first use in this function)
ex_access.c:79: error: ‘DB’ has no member named ‘err’
ex_access.c:107: error: ‘DB_NOOVERWRITE’ undeclared (first use in this function)
ex_access.c:107: warning: passing argument 4 of ‘dbp->put’ makes integer from pointer without a cast
ex_access.c:107: error: too many arguments to function ‘dbp->put’
ex_access.c:111: error: ‘DB’ has no member named ‘err’
ex_access.c:112: error: ‘DB_KEYEXIST’ undeclared (first use in this function)
ex_access.c:120: error: ‘DB’ has no member named ‘cursor’
ex_access.c:121: error: ‘DB’ has no member named ‘err’
ex_access.c:130: error: ‘DB_NEXT’ undeclared (first use in this function)
ex_access.c:134: error: ‘DB_NOTFOUND’ undeclared (first use in this function)
ex_access.c:135: error: ‘DB’ has no member named ‘err’
ex_access.c:141: error: ‘DB’ has no member named ‘err’
ex_access.c:144: error: too many arguments to function ‘dbp->close’
ex_access.c:146: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘int’
ex_access.c:152: error: too many arguments to function ‘dbp->close’
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:27:17+00:00Added an answer on May 28, 2026 at 8:27 am

    this is probably a linking error. You’ll need to specify the libdb shared library, eg, “-ldb”. If the Berkeley DB libraries are installed system-wide, then you can assume that shared libraries and header files are installed in the default paths (/usr/lib, /usr/lib64, /usr/include). If not, then you’ll need to explicitly include the correct paths. Assuming default installation of Berkeley DB, you can try something like

    gcc -ldb your_sample.c -o your_sample
    

    Also, your question is related to this post: berkeley DB: can't compile c++ codes

    Alternatively, go inside the build folder (eg, “build_unix”) and run “make examples” to build the examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying to execute the following lines only the last two statements are displayed(Here
I am trying to execute this but cant see any result: <script> function init()
I'm trying to execute the following line: exit | sqlplus username/password@sid @test.sql Works great
I am trying to execute a .bat file remotely and implementing following lines of
I am trying to execute a codeline similar to the following rs3 = cn2.Execute(strsql);
I am trying to execute the following code from a firefox extension but it
I have been trying to execute the following code. Though the task is trivial,
Trying to execute WordCount example from cassandra and getting an error: Exception in thread
I trying to execute the following code... but the AlertDialog is creating problems! Without
I'm trying to execute a batch file in C#, but I'm not getting any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.