[ wxMSW,wxGTK (CVS snapshot 20040716) + mingw/gcc ] Possibly bug

[ wxMSW,wxGTK (CVS snapshot 20040716) + mingw/gcc ] Possibly bug

Post by eriks.zele » Tue, 12 Oct 2004 17:39:57


Hi all,
I'm using the same CVS snapshot under linux(wxGTK)&win32(wxMSW), the same
configuration parameters were used to compile wxWidgets.
I'm using wxUNICODE with GTK2 & win32. Now i'm writing console program and
problem actually is that i can't compile the same code under both platforms
identically. I'm using wxPuts and wxGetchar macros, both works different on
both platforms:
wxPuts on linux need \n symbol to write text on new line, on win32 it makes
additional \n itself, which i think is wrong.
Also wxGetchar compiles ok under linux, but under win32 i need manually
check the platform and put getwchar instead of wxGetchar, because mingw
can't find _getchar function declaration. I tried to put putws instead of
wxPuts under win32, but this also did not work.
Is it bug, or may be it is solved now or my misunderstanding of the subject
?
Eric
Thank you in advance


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

[ wxMSW,wxGTK (CVS snapshot 20040716) + mingw/gcc ] Possibly bug

Post by vadi » Wed, 13 Oct 2004 08:09:57


EZ> wxPuts on linux need \n symbol to write text on new line, on win32 it makes
EZ> additional \n itself, which i think is wrong.

No, it is correct. The standard puts() function does append '\n', so
wxPuts() should do it as well. Defining wxPuts() as wxFputs(stdout) under
Unix is wrong though, I've fixed it in the cvs -- thanks for reporting.

EZ> Also wxGetchar compiles ok under linux, but under win32 i need manually
EZ> check the platform and put getwchar instead of wxGetchar, because mingw
EZ> can't find _getchar function declaration.

I hope someone else, more familiar with multiple mingw32 versions, can
find a test we must use to catch this case...

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.yqcomputer.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM