On Wed, 5 May 2004, Seo Sanghyeon wrote:
Now problem is that it seems wineg++ has problems with Wide character functions. Not in C, but it seems in C++ libc headers are included instead of msvcrt headers, resulting in compilation failures. Is my analysis correct?
Yes, this is correct. Because you're using wchar_t functions, you _must_ be using the -mno-cygwin flag when both compiling and linking. Other than that, the patches look trivial, but I must ask you to not commit to them for now: 1. A lot of your patches add include files. Why are they needed under Wine and not in Windows? This is most likely a bug in Wine, please help us fix it in Wine, not by patching the app. 2. I've noticed a few #ifdef __WINE__ where you define stuff that seems to be missing from the Wine headers. This stuff should go instead into the Wine headers, and be removed from the app. This is something you should always do because patching the app this way (a) will break as soon as stuff is added to the Wine headers, and (b) we're missing a golden opportunity to fix the headers. 3. In general, you should have no tests for __WINE__. If you do, you have to think really hard *why* you need such a test. Similarly, you shouldn't need to add/delete/reorder includes. This may have been the case without the -mno-cygwin flag, but with that flag specified, you shouldn't need to touch them. If you do, please investigate why and help us fix it in Wine instead.
Thanks for the effort. Please feel free to email wine-devel if you need help with the port, this is cool stuff!