Solved

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

Posted on 2011-03-19
2
515 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 78

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

717 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