Its about time.

Published July 21, 2009
Advertisement
For the first time, I've separated my engine code into its own project and built it as a static library. It was laughably easy. Not arrogant laughing, but relieved laughing. I've never had the need to build a library, or enough common usable code to warrant doing so. I have a GUI editor that inherits from the same framework class as my game class. I was manually calling (from the game class) all of the editor's methods that inherited from the framework so I could run the GUI editor from the main menu of the game. It was ugly and ridiculous, and the only reason I did that was because I thought learning how to build a library would be time-consuming (and I didn't want to copy the code into another project). So now, all within the same solution, I have my engine project that builds a static library, the GUI editor that links to that library, and the game that links to it as well.

The game and editor projects still had to link to all the libraries that the engine does. I'm not sure this is avoidable. I got a bunch of linker warnings saying the 'PDB' program database files for one of the projects couldn't be used. I figured out it was because all three projects were compiling into the same intermediate directory. Everything seemed fine except the "vc90.pbd" must have been overwritten by the previously-built project. Anyway, I had to make sure the intermediate directories had project-specific names and not just 'Debug' and 'Release'.
Previous Entry Entity Files
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement