Solved

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

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Internal CA server 6 134
Can't connect to FTP 18 152
SSH setup on ASA 5505 17 122
Golang on CentOS / Fedora 2 8
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…
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 …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

732 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