Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undefined Reference Error

Status
Not open for further replies.

tewari68

Programmer
Jan 25, 2005
87
0
0
US
Hi,
I am using Kdevelop IDE (C++ project).
I added a new readopt.h and readopt.cpp files to the existing C++ project.
In readopt.cpp I have a function for database queries
Code:
void dbconn(host, user, pass, database)
In the main program I create a readoptn object
readopt readoptn and the call the dbconn function
readoptn.dbconn(host, user, pass, database)

Now when i compile the prog (Make), I get "Undefined Reference" error.

Appreciate any help.

Thanks,
Tewari
 
did you #include readopt.h in your file with the main program and also did you add readopt.o to your makefile
 
Yes I have included the readopt.h with the main program and the readopt.o file also exists in the directory, however I don't find any reference to the ".o" files inside the Makefile.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top