blocksds / sdk

Main BlocksDS SDK repository
https://blocksds.github.io/docs/
130 stars 5 forks source link

videoGL enum conversion issue breaks compilation of any C++ project #140

Closed lifehackerhansol closed 3 months ago

lifehackerhansol commented 3 months ago

It seems at some point between v0.12 and v0.14 C++ compiling has been broken.

This can be tested directly from this repository by attempting to build rom_arm9_only with main.c renamed to main.cpp:

In file included from /opt/blocksds/core/libs/libnds/include/nds/arm9/boxtest.h:19,
                 from /opt/blocksds/core/libs/libnds/include/nds.h:136,
                 from source/main.cpp:8:
/opt/blocksds/core/libs/libnds/include/nds/arm9/videoGL.h: In function 'GL_TEXTURE_SIZE_ENUM glTexSizeToEnum(int)':
/opt/blocksds/core/libs/libnds/include/nds/arm9/videoGL.h:529:20: error: invalid conversion from 'int' to 'GL_TEXTURE_SIZE_ENUM' [-fpermissive]
  529 |             return -1;
      |                    ^~
      |                    |
      |                    int
lifehackerhansol commented 3 months ago

This seems to be the source of it: https://github.com/blocksds/libnds/commit/f01c830d1f00bf7559dd60c79894a37bb311e56c

AntonioND commented 3 months ago

That was reported some days ago, and it's fixed here: https://github.com/blocksds/libnds/commit/069dd18d15e7b8af2e8555d47c08b3c0f9484a1b

There should be a new release this weekend to fix that. Until then I believe that the git package in Wonderful Toolchain should have the fix.

lifehackerhansol commented 3 months ago

I see, I'll just use the git package in the meantime.