LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


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

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


Hi.
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?

Thanks
Siavash
 
Old 04-08-2005, 03:17 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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, 03:59 PM   #3
Siavash
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
Siavash
 
  


Reply



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 09:01 PM
Add existing C++ files to Kdevelop project Siavash Linux - Software 1 04-08-2005 02:31 PM
I think I want to add C header files to my KDevelop project? Scrag Programming 3 03-26-2004 05:02 PM
kdevelop add folder and add new class is slow edwardt Programming 0 03-03-2004 06:04 PM
Cannot see Open GL project in KDevelop project wizard SparceMatrix Programming 2 08-07-2002 11:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:26 AM.

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