[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] wide-char and g++
Hi,
On tiistai 16 huhtikuu 2013, Helmut Karlowski wrote:
> Eero Tamminen, 16.04.2013 21:45:06:
> > The first problem with wchar.h is that it's missing the stuff
> > needed for C++ compatible headers, either:
> > -------
> > #ifdef __cplusplus
> > extern "C" {
> > #endif
> > ...
> > #ifdef __cplusplus
> > }
> > #endif
>
> True. But adding it does not help unfortulately.
Ok, but without that it shouldn't work as C++ name
mangled symbols wouldn't match unmangled ones in libc.
> >> When I write a function for example:
> >>
> >> size_t wcslen(wchar_t const* s)
> >> {
> >>
> >> return wcslen( (const wchar_t*)s);
> >>
> >> }
> >>
> >> it works, i.e. the symbol is found.
> >
> > Is this a C or C++ function?
>
> The lib (wcs*) is C, the unrar-source C++.
I meant whether your test program was compiled
as C or C++ code (with gcc or g++), as that dictates
whether those symbols were name mangled (in absense
of header stating otherwise)...
- Eero