|
-
July 15th, 2011, 03:54 AM
#7
Re: Converting a C Program to Compile with C++
The reasons for the various link errors were many. In the case of CheckDupLists, there were two modules in the project, one ListSup2_32.cpp and the other LinkSup2_32.cpp. I only noticed the difference when opening ListSup2_32.cpp from different sub-projects appeared to open two different files.
There were also problems with the labyrinth of header files some previous program had set up with a bizarre array of #defines and conditional blocks of externs. Some functions were defined differently in different files and when compiled in C, they happened by chance to go down the right path to compile OK, but when I switched to CPP, this changed some of the conditionals and things got weird. This was the toughest to untangle.
I also found some global data declarations that should never have worked at all. The same global data structure was defined in a couple of files. I don't know why this hasn't caused bugs up until now.
This code is a mess. Has anyone ever seen how spinner controls and list boxes were populated in Windows 2? It's extremely non-intuitive. I've learned to appreciate the more modern Windows libraries much more.
Thanks for the help,
Bill
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|