Sign in to follow this  
Chris_N

file dependencies

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this