This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is wchar_t support possible with Cygwin/GCC?


Hi Bruce,

I just saw your message on the cygwin mailing list, and I think that this
post might interest you.

I also tried to build xerces-c on cygwin. I also stumbled against the
wctype.h problem. I found a (very ugly) workaround for it, so I will show
it to you if you are interested.

The wctype.h is under the /usr/include/mingw directory. The functions from
there are defined in libmsvcrt.a which is located under /usr/lib/mingw

The problem however is that you cannot link directly with libmsvcrt.a
because doing this will negatively affect the behavior of other functions
(such as fopen() and all the other stdio stuff). Therefore I made a new
dll which links with libmsvcrt.a and but exports only the wchar related
functions. I created a header named wcwrapper.h which #defines the wchar
functions to the functions from the dll. I modified the file which
included wctype.h to include the new header file (wcwrapper.h) and
modified the makefile to make xerces link with my .dll

I can e-mail you the code of that dll and the wrapper if you want to.


After other (not that ugly)  modifications I got xerces-c compiled on
cygwin.  However there are still problems with it. It does not pass all
the tests.

One problem is caused by the fact that C++ class static members which
reside in DLLs. The problem is that for some reason the data members get
duplicated inside the executable, but without initialization. Therefore
e.g. XMLUni::fgZeroLenString gets garbled causing IRangeTest to fail. I
have reported this problem in an earlier post (see my post
entitled g++/static members/DLL problems on the cygwin mailing list). I
want to see what responses I get, then I will decide what to do next.


							Regards,

								Emil


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]