How to solve the problem : undefined refrence to 'db_create'?

Dear,
I am using kdevelop kit to debug a simple project.

The project has <db.h> berkeley DB header. When I tried to build the project, an erro showing that an "undefined refrenec to db_create"...

How do i fix such a problem and continue debug?

see attached image ...


nabil.

Image.png
nabilhammoudAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
evilrixConnect With a Mentor Senior Software Engineer (Avast)Commented:
You need to link to whatever library contains the runtime for that function. In this case it looks like you're using Berkley DB so it'll be something like db_cxx or db_c.
0
 
lomo74Connect With a Mentor Commented:
link against libdb.a
i.e. add -ldb to your linker commandline
or, if you prefer do it in your IDE, go to your project settings, you should find something like "libraries" or "dependencies" and add the required library
0
 
nabilhammoudAuthor Commented:
THX
0
All Courses

From novice to tech pro — start learning today.