This problem comes up quite a bit for me. I'll have a project that I work on for a couple months (the point is that it is a large project with multiple classes, etc). As an example, say I made a program that draws a square. So I have this project all setup in KDevelop (or image Visual Studio for all you non-linux-ers!) called Square. Now, moving on to bigger and better things, I want to draw a checkerboard, using all the functionality I have just put into drawing a square. So I make a project called Checkerboard, and either add the Square directory to the Include path, or copy some of the files from square into checkerboard, or do something like that. As soon as there are a couple of levels of this, it gets really out of hand.

Is there some concept that I'm missing to be able to layer projects/thoughs on each other like this. The problem is that the next project is thought of after analysing the results from the first one, so it's not like I could have just made the Checkerboard project from the beginning, because I didn't know I was going to make a checkerboard, I only knew I was going to make a square!

Does this make sense? How does everyone do this?

Thanks,

Dave

Recommended Answers

All 2 Replies

If the classes can be plugged into other projercts without change then make a shared library out of them. That way there is only one set of source files and the projects all link with the same library.

Yea, I did that at one point, but then I was modifying the source of the dependencies so much that I added those files to the project so they compiled when I built the top level project because I kept forgetting to open the old projects and rebuild them. Know what I mean?

I guess that is the only option though?

Dave

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.