Error: invalid use of incomplete type 'class std::__make_unsigned_selector<wchar_t, false, false>' #46
Comments
|
I saw a comment on amigans.net related to C++11 and comment was this The latter defines STRICT_ANSI which disables newlib functions that are not standard ANSI." So maybe try changing compile options to use the gnu++11 |
|
I don't think the error is related to newlib. As you can see from the error message gcc seems to have problems compiling the C++ code. But the code is correct and compiles fine on all the other platforms I mentioned. And besides, I'm using -std=c++11 on all other platforms so it's unlikely to be the reason. FWIW, I've tested compilation with -std=gnu++11 but as expected it doesn't make a difference.
|
|
AFAIK wide char support is not supported for newlib, so no support for it is included in our gcc. I don't know if it is supported for clib2. If possible, disable the need for wide characters. |
|
Unfortunately, wide chars are used all over the project and there is no way to get rid of them. But I don't think that I'd need the complete wide char library for the project to run. On MorphOS it works too and the wide char support is very limited on MorphOS too. I've seen that clib2 has dummies for all wide char functions but I'm not able to get it to compile with clib2 either because the clib2 wide char definitions seem to clash with gcc definitions. Here's the output I get when compiling with
As you can see, the clib2 definition of |
|
Can you please create a small test example, ideally as a pull request with a file in the |
|
See my PM.
|
|
[quote] You could edit the clib2 header, since long and long int are essentially the same, that might get things compiling. Not perfect if it's something you need to distribute as src code, but if internal then not a problem. |
|
The clashing `mbstate_t` definitions aren't the main problem. The main problem seems to be that the OS4 gcc doesn't support `wchar_t` properly.
|
|
There are multiple problems I think. I added a simple test for at least one of them. |
|
The
and |
|
The problem was fixed in clib2 by commit adtools/clib2@309bbd8 which happened after the latest release available so far. |
|
BTW, this is a duplicate of #42. |
I'm trying to compile a C++11 project with gcc 5.4.0 but it doesn't work. I'm getting the error mentioned above. Here is the complete error message:
How can I fix this please? On all other systems (MorphOS, Linux, Mac OS, Windows, Android) the code compiles fine but with the OS4 gcc 5.4.0 I'm getting this error and I haven't got a clue how to fix it. Looks like a compiler issue to me.
I'm invoking gcc like this:
gcc -c -std=c++11 -o test.o test.cppThe text was updated successfully, but these errors were encountered: