Include multiple classes

Hi,
I would like to include multiple classes into my project.
I'm using Eclipse IDE on Linux to compile and link.
I'm just too stupid to search for the right thing.

What I've got:
Directory structure like this(simplified)
1
2
3
4
5
6
7
8
class1/myclass1.cpp
class1/myclass1.h
dict2/class1/myclass2.cpp
dict2/class1/myclass2.h
dict2/class2/myclass3.cpp
dict2/class2/myclass3.h
dict2/class3/myclass4.cpp
dict2/class3/myclass4.h

myclass1.h includes all the other headers
None of them is compiled yet.

I've got a main.cpp and Makefile created by Eclipse

What I'm doing

just use something like this in my main:
1
2
3
4
5
6
#include <class1/myclass1.h>
void main(void)
{
  myclass1 foo;
  exit(0);
}

Now the thing is if i try to compile and link all the stuff he says no reference to myclass1();
Sure, my Makefile created by eclipse neither compiles the myclass1.cpp nor it's includes its object file.
What to do?
So how can I tell eclipse to compile all those classes and than include the object files , when linking?
I really would like Eclipse to create me that Makefile, instead of doing everything in bash by hand. That's what Makefiles are good for right?

I hope you understand what I'm talking about , I'm pretty new to this c++ stuff, not native English speaker and desperate:)

Regards ludden


Topic archived. No new replies allowed.