re using microsoft foundation classes with borland c in article qv rc fcp news cs tu berlin de make cs tu berlin de m kerkhoff writes hi all has anybody tried to compile ctrltest from the mfc samples directory after compiling the mfc libs with bwc seems to me that bwc isn t able to distinguish pointers to overloaded functions for example imagine the following overloaded functions void same name void void same name int after trying the whole day i think with bwc its impossible to take the adress of one of the above two functions and assign it to a properly defined function pointer am i right has anybody else had this problem thanx i think you may be chasing the wrong problem i don t think it is the function overloading at all i do that sort of thing all of the time in bc without a hitch the big problems i have encountered in porting mfc to bc is that fact that mfc depends on a couple of invalid c assumptions i have never gotten the entire ctrltest app to run under bc but the reason is that ms makes some bad assumptions about the order in which static global objects are initialized i e some objects are getting accessed before they are initialized the problem is in the owner draw menu code somewhere if you comment out that section all other pieces of ctrltest work fine two other major gotchas i have found using mfc under bc the cfile openflags enum uses hard coded numbers for the open mode rather than the manifest constants defined in fcntrl h which differ between msc and bc all of the mfc collection classes depend on another bad c assumption that a reference to a base object can used be in place of a reference to a derived object true for pointers not for references i am sure there are other problems along the same lines but i have not encountered them yet i have not seen mfc yet but i hope that some of these will be addressed if they are not all of ms s hype about portability to other vendor s compilers will be just that if these were my employer s opinions i wouldn t be posting them whoever said nothing lasts forever was obviously r brendler not a cubs fan mike royko spss inc chicago il
