by Codewiz51
11. November 2008 22:58
Update: Check out my wiki page for the latest download of WinROTT.
I've been able to make quite a bit of progress converting C modules to C++ modules in WinROTT. Most of the problems I encounter at this stage are missing link symbols. It is time consuming rearranging code and inserting extern "C" blocks. As always, testing consumes the most amount of time. I hope to have a significant (to me) release this weekend. I am down to about 30 modules that need converting. This is down from roughly 60 when I started.
I've had a couple of inquiries regarding my porting strategy. I employ a concept of "least dependency" when selecting modules to move over to C++ from C. In practice, you simply choose the last C module in the compile process. In theory, the last C module to compile has the fewest dependencies and should require the smallest amount of fixes for missing symbols. The occasionally doesn't work, but it's simple to implement. I try to never port more than one module between testing. For me, testing entails playing several game levels to verify code execution. When I complete the C to CPP migration, I want to implement some unit testing, which should significantly speed up future modifications.
When the migration is complete, I intend to scrub the code of extern "C" blocks and create proper header files for the modules. Currently, the code has a number of places where I simply threw in the function prototypes to get the code to compile and execute. You'll often see multiple prototypes for the same function included in the source. This is a result of not having proper header files that can be included as needed in source modules.
faaca22c-bfb1-4116-afa2-c859df57642e|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
WinROTT