View the Most Wanted LQ Wiki articles.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-08-2005, 02:11 PM   #1
LQ Newbie
Registered: Apr 2005
Posts: 5

Rep: Reputation: 0
Add existing C++ files to Kdevelop project

I've made a "simple C++ hello world" project in Kdevelop-3.1.0 (using kde 3.3 in SUSE 9.2) and I want to add my existing .h and .cpp files to the project but I don't know the correct way. Now when I include the related header files above "main" method and try to make an instance from the class, I receive an error (undefined refrence to <Constructor of the class >).
It seems that the cpp file doesn't link to header file.

For example:

#include <iostream.h>
#include "Parent/Parent.h"

int main(){
Parent p; //Error refers here (undefined refrence to Parent() )
cout<<"Hello World"<< endl;
return 0;

Can any one help me about it?

Old 04-08-2005, 04:17 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,551

Rep: Reputation: 160Reputation: 160
You probably don't add the other files correctly. Use 'Add existing files' in Automake manager (for both .h and .cpp files) and put them in the right directory (in your case, in a subdirectory of your project source).
Old 04-08-2005, 04:59 PM   #3
LQ Newbie
Registered: Apr 2005
Posts: 5

Original Poster
Rep: Reputation: 0
In Kdevelop of Redhat 9 I used to make new subdirectory easily and add my files there, but in SUSE 9.2 I couldn't find the place that I can make and add new directories to project. I've just found a place that I can make new subproject there(in Automake manager). Would you guide me about making new subdirectories and adding files there.

Thank You Very Very Much


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
KDevelop project - Files to put into version control? skylark Linux - Software 1 10-21-2005 10:01 PM
Add existing C++ files to Kdevelop project Siavash Linux - Software 1 04-08-2005 03:31 PM
I think I want to add C header files to my KDevelop project? Scrag Programming 3 03-26-2004 06:02 PM
kdevelop add folder and add new class is slow edwardt Programming 0 03-03-2004 07:04 PM
Cannot see Open GL project in KDevelop project wizard SparceMatrix Programming 2 08-08-2002 12:14 AM

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration