Solved

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

Posted on 2011-03-19
2
485 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 76

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now