RE: [GD-General] Practical Game Structure.
Brought to you by:
vexxed72
From: Brian S. <bs...@mi...> - 2002-01-14 05:35:45
|
Common's headers should be included over and over again. Common the = static library should only be included in the final application or in = the DLLs. I'm guessing that you're linking the common library into = every library project and ending up with lots of copies of it in your = final application. If you include Common the static lib in other static libs - say Video = and Resource Manager - and then include Video and RM in your final = application, when the linker goes looking for functions inside Common it = can pull them from either Video or RM, and so it complains to you. Don't forget that a static library is not a stand-alone piece of code - = functions in Video will ultimately need to execute functions inside = Common, but that will only happen once everything is linked together = into an app or DLL.=20 Hope this helps, --brian -----Original Message----- From: Chris Brodie [mailto:Chr...@ma...] Sent: Sun 1/13/2002 3:14 PM To: 'gam...@li...' Cc:=09 Subject: [GD-General] Practical Game Structure. In the beginning of my current project I attempted to create structure = within my project by using static libs. However as the project grew and = the number of static libs grew my grand plan of structure has become a = bit wobbly. For example: OpenGL Renderer is dependent on Common, Graphics and Renderer. Graphics = is dependent on Common. Renderer is dependent on Application, Graphics, = Video and Resource Manager. Application, Video and Resource Manager are = all dependent on Common. Common includes things like expat and zlib + = ~50 other classes. From this you can assume that just about everything uses common. The = problem is that since common is included and included again and again I = seem to be getting linker warnings about multiply defined symbols. I've = been looking for an answer to this for months, not because I get a few = warnings and it looks messy, rather I get 4000 warnings and it takes a = -long- time for them to be displayed, long enough that it's probably = doubling my build time. Originally I went with this structure to reduce the amount of unused = code that gets linked to all my DLL's (one for each renderer, mixer, = input system etc). I'm happy to hear from anyone who can either suggest a better structure = or knows how to turn a linker warning off. I'm using .NET but this = problem was with me under VC6 too. Many thanks Chris NOTICE This e-mail and any attachments are confidential and may contain = copyright material of Macquarie Bank or third parties. If you are not = the intended recipient of this email you should not read, print, = re-transmit, store or act in reliance on this e-mail or any attachments, = and should destroy all copies of them. Macquarie Bank does not guarantee = the integrity of any emails or any attached files. The views or opinions = expressed are the author's own and may not reflect the views or opinions = of Macquarie Bank.=20 _______________________________________________ Gamedevlists-general mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-general |