more compiling errors

  • i_am_sandwich
    22nd May 2017 Member 0 Permalink

    i have added the element to elements.cpp but i get this error

     


    C:\Users\J\Desktop\The-Powder-Toy\The-Powder-Toy-master>scons --static
    scons: Reading SConscript files ...
    WARNING: duplicate element ID 161 (PT_MGL)
    WARNING: duplicate element ID 161 (PT_PPIP)
    Checking whether the C compiler works... (cached) yes
    Checking whether the C++ compiler works... (cached) yes
    Checking if 64 bit... (cached) no
    Adding 32 bit compile flags
    Checking for C library mingw32... (cached) yes
    Checking for C library ws2_32... (cached) yes
    Checking for C library SDLmain... (cached) yes
    Checking for C library SDL... (cached) yes
    Checking for C header file SDL.h... (cached) no
    Checking for C header file SDL/SDL.h... (cached) yes
    Checking for C library lua5.1... (cached) yes
    Checking for C header file lua5.1/lua.h... (cached) yes
    Checking for C library fftw3f... (cached) yes
    Checking for C library bz2... (cached) yes
    Checking for C header file bzlib.h... (cached) yes
    Checking for C library z... (cached) yes
    Checking for C library pthread... (cached) yes
    Checking for C library m... (cached) yes
    Checking for C library gdi32... (cached) yes
    Checking for C library winmm... (cached) yes
    Checking for C library dxguid... (cached) yes
    scons: done reading SConscript files.
    scons: Building targets ...
    g++ -o build\src\PowderToySDL.o -c -std=gnu++98 -Wno-invalid-offsetof -msse -msse2 -O3 -ftree-vectorize -funsafe-math-optimizations -ffast-math -fomit-frame-pointer -funsafe-loop-optimizations -DSDL_INC -DWIN -D_WIN32_WINNT=0x0501 -D_USING_V110_SDK71_ -DX86 -DX86_SSE -DX86_SSE2 -DPTW32_STATIC_LIB -DGRAVFFT -DLUACONSOLE -DUSE_SDL -Ibuild\src -Isrc -Ibuild\data -Idata -Ibuild\generated -Igenerated src\PowderToySDL.cpp
    =====
    In file included from c:\mingw\include\pthread.h:76:0,
    from src/common/tpt-thread.h:16,
    from src\client/requestbroker/RequestBroker.h:7,
    from src\client/Client.h:16,
    from src\PowderToySDL.cpp:46:
    c:\mingw\include\_ptw32.h:81:3: warning: #warning "PTW32_STATIC_LIB is deprecated; use _PTW32_STATIC_LIB." [-Wcpp]
    # warning "PTW32_STATIC_LIB is deprecated; use _PTW32_STATIC_LIB."
    ^
    In file included from src/simulation/Elements.h:60:0,
    from src/simulation/Simulation.h:8,
    from src\gui/game/GameModel.h:7,
    from src\gui/game/GameView.h:9,
    from src\gui/game/GameController.h:5,
    from src\PowderToySDL.cpp:49:
    generated/ElementClasses.h:1574:7: error: redefinition of 'class Element_MGL'
    class Element_MGL: public Element
    ^
    generated/ElementClasses.h:1566:7: error: previous definition of 'class Element_MGL'
    class Element_MGL: public Element
    ^

    =====
    scons: *** [build\src\PowderToySDL.o] Error 1
    scons: building terminated because of errors.

  • LBPHacker
    22nd May 2017 Developer 0 Permalink

    You defined Element_MGL multiple times.

  • i_am_sandwich
    22nd May 2017 Member 0 Permalink

    oh lol

  • LBPHacker
    22nd May 2017 Developer 0 Permalink

    Yeah, the error messages are there to help :P

  • i_am_sandwich
    22nd May 2017 Member 0 Permalink

    @LBPHacker (View Post)

     can we talk tptm