Solved

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

Posted on 2011-03-19
2
503 Views
Last Modified: 2012-05-11
hellow,

I am using Kdevelop as a DK for my simple application to get some knowledge about db.h.

When I am trying to build the application, I am encoutering the belwo error even though all required #include and defentions are available and working fine.

The error is as follows:
Linking CXX executable try
CMakeFiles/try.dir/main.cpp.o: In function 'main'
/root/projects/try/main.cpp:15: Undefined reference to 'db_create'

Could some body help me to cope such error.

Nabil




0
Comment
Question by:nabilhammoud
2 Comments
 
LVL 77

Accepted Solution

by:
arnold earned 250 total points
ID: 35171985
I'm unfamiliar with the tool you use to compile, but it deals with you trying to compile calling a function that is not included/loaded.

gcc -c -o main.cpp.o CMakeFiles/try.dir/main.cpp
This will create the object without validating the link.
you would have to make sure during the linking to reference the -ldb where presumably db_create is define.

0
 

Author Closing Comment

by:nabilhammoud
ID: 35180694
THX
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question