Linking failed when build custom TPT

  • LegenDUST
    17th Feb 2021 Member 0 Permalink

    I tried to build my custom TPT.

    I followed TPT wiki guideline for builiding TPT in windows

    I typed 'ninja', as wiki said me to do.

     

    This is error I got

     

    FAILED: powder.exe
    "c++" @ powder.exe.rsp
    Warning: corrupt .drectve at end of def file
    C:/game/powder-95.0-win32/custom_tpt/The-Powder-Toy/subprojects/tpt-libs-prebuilt-win64-dynamic-v20210103095432/dynamic-win64/SDL2main.lib(SDL2main.dir/Release/SDL_windows_main.obj):(.text$mn+0x1e6): undefined reference to `SDL_SetMainReady'
    C:/game/powder-95.0-win32/custom_tpt/The-Powder-Toy/subprojects/tpt-libs-prebuilt-win64-dynamic-v20210103095432/dynamic-win64/SDL2main.lib(SDL2main.dir/Release/SDL_windows_main.obj):(.text$mn+0x233): undefined reference to `SDL_ShowSimpleMessageBox'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

     

    What should I do?

     

     

     

    ====edited====

    So I just used VS to build it, and it successed.

    Edited 3 times by dhnam. Last: 17th Feb 2021
  • LBPHacker
    17th Feb 2021 Developer 0 Permalink
    I can't replicate this issue, I'll need your meson configuration options and powder.exe.rsp.
    Edited once by LBPHacker. Last: 17th Feb 2021
  • LegenDUST
    17th Feb 2021 Member 0 Permalink

    Summerize
    1. I followed wiki - just plain `meson build-debug`

    2. powder.exe.rsp is different because I used GCC

    3. I used MinGW for gcc

    4. Version I used is MinGW-w64 8.1.0 (posix-seh), downloaded from sourceforge