file dependencies

Started by
1 comment, last by extralongpants 18 years ago
Hello I'm working on a simple game engine and I've run in to a problem that I think you guys can solve. The problem is this, I have build a library with all the core features, such as math, logger, profiler classes. Now when I will start the development with the rendering (both GL and DX), I'm not sure how to do it, take a look at how the dependency will look like: Core.lib [math] matrix.h vector.h etc... [kernel] logger.h profiler.h Now when i create the DX rendering it will look like this: dxrenderer.lib - depend on Core.lib Is this a acceptable way of doing something like this. Sorry for my language I'm not that good at expressing problems in words :) / Christoffer Nyberg
/ Christoffer Nyberg( www.christoffernyberg.com )
Advertisement
I don't see any problem with this solution, if a module depends or requires on another module it should almost certainly be linked through a static or dynamic library depending on the application. The only other solution I can think of is copying code accross however that may cause many problems if you intend to revise parts of a module.
ToDoList.GrowthRate = WorkRate*2, it's more efficient to not work.
Having modules depend on other modules is perfectly fine, especially in your case, since you have so few modules to begin with. Just be aware that you should avoid things such as interdepency between modules (a requires b, b requires a), and long, complicated chains of dependencies.

This topic is closed to new replies.

Advertisement