Different types of resources having the same name cause build failures

Reporter: sharkwouter  |  Status: open  |  Last Modified: April 17, 2020, 02:35:35 PM
If I create a sprite and and object which have the same name, building the project will fail. If I then rename the object to something different, the project will build just fine. When importing an example which has resources with the same name, LateralGM does ask you if you'd like to rename them, but you can click no if you don't want to.

I was expecting the game to build fine to be the case for the following reasons:

  • Every game maker version up until 8.1 had no problem with this.
  • No error message is shown in LateralGM when setting a name which is already in use.
  • When building, the reason for the issue is not shown in an easy to read way.

Here is the last part of the build log:

[g++] SHELLmain.cpp
In file included from �[01m�[KSHELLmain.cpp:92�[m�[K:
�[01m�[KC:/Users/wouter/AppData/Local/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:52:12:�[m�[K �[01;31m�[Kerror: �[m�[K'�[01m�[Ktest�[m�[K' conflicts with a previous declaration
   52 |     test = �[01;31m�[K0�[m�[K,
      |            �[01;31m�[K^�[m�[K
�[01m�[KC:/Users/wouter/AppData/Local/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_resourcenames.h:37:5:�[m�[K �[01;36m�[Knote: �[m�[Kprevious declaration '�[01m�[Kenigma_user::<unnamed enum> enigma_user::test�[m�[K'
   37 |     �[01;36m�[Ktest�[m�[K = 0,
      |     �[01;36m�[K^~~~�[m�[K
make[1]: *** [Makefile:180: C:/Users/wouter/AppData/Local/ENIGMA/.eobjs/Windows/Windows/Mingw_GCC_G++/Run/SHELLmain.o] Error 1
make[1]: Leaving directory '/home/wouter/enigma-dev/ENIGMAsystem/SHELL'
make: *** [Makefile:24: Game] Error 2
make: Leaving directory '/home/wouter/enigma-dev'

This was tested on Windows 10 with the last commit from yesterday evening compiled with MSYS2 using these instructions: https://enigma-dev.org/docs/Wiki/Install:Windows

Yes I'm seeing the squares in my build log. I'm building platform SDL.

Hope that helps :)

Please sign in to post comments, or you can view this issue on GitHub.