Solved

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

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Mint 18 31 89
Error Message during CentOS 7 Minimal Install 3 41
wipe a usb using python 5 45
Windows 2012 R2 -- create 3.5TB GPT from unallocated space ? 1 29
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

785 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