Dullaron |
Diablo III - Dunard #1884
|
|
|
Reged: 07/22/05
|
Posts: 6125
|
Loc: Fort Worth, Tx
|
|
Send PM
|
|
I was trying to build it. Twice got an error. Dev tried to help me out.
01/10/24 04:59 AM
|
|
|
He told me to do this.
Quote:
$ pacman -S mingw64/mingw-w64-x86_64-SDL2 msys/cmake mingw64/mingw-w64-x86_64-gcc git $ git clone -b modernize https://github.com/autch/piemu.git $ cd piemu $ mkdir BUILD $ cd BUILD $ CC=x86_64-w64-mingw32-gcc cmake ../ $ ninja
Already in the msys64-2022-01-12.exe. No need to redownload the tools.
Error #1. WinMain
[30/30] Linking C executable piemu.exe FAILED: piemu.exe cmd.exe /C "cd . && D:\msys64\mingw64\bin\x86_64-w64-mingw32-gcc.exe CMakeFiles/piemu.dir/bcu.c.obj CMakeFiles/piemu.dir/emu.c.obj CMakeFiles/piemu.dir/fram.c.obj CMakeFiles/piemu.dir/lcdc.c.obj CMakeFiles/piemu.dir/piemu.c.obj CMakeFiles/piemu.dir/usbc.c.obj CMakeFiles/piemu.dir/core.c.obj CMakeFiles/piemu.dir/flash.c.obj CMakeFiles/piemu.dir/iomem.c.obj CMakeFiles/piemu.dir/main.c.obj CMakeFiles/piemu.dir/sram.c.obj -o piemu.exe -Wl,--out-implib,libpiemu.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,-Bstatic -lSDL2main -Wl,-Bdynamic -lSDL2 libc33core.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o): in function main': C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18: undefined reference to WinMain' collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
Then he told me to do this.
Quote:
try to uncomment SDLmain line in piemu/CMakeLists.txt, or change its order among them
piemu/CMakeLists.txt
Lines 88 to 92 in 19d95d5
target_link_libraries(piemu ${SDL2_LIBRARIES} c33core # SDLmain )
Error #2. lSDLmain
FAILED: piemu.exe cmd.exe /C "cd . && D:\msys64\mingw64\bin\x86_64-w64-mingw32-gcc.exe CMakeFiles/piemu.dir/bcu.c.obj CMakeFiles/piemu.dir/emu.c.obj CMakeFiles/piemu.dir/fram.c.obj CMakeFiles/piemu.dir/lcdc.c.obj CMakeFiles/piemu.dir/piemu.c.obj CMakeFiles/piemu.dir/usbc.c.obj CMakeFiles/piemu.dir/core.c.obj CMakeFiles/piemu.dir/flash.c.obj CMakeFiles/piemu.dir/iomem.c.obj CMakeFiles/piemu.dir/main.c.obj CMakeFiles/piemu.dir/sram.c.obj -o piemu.exe -Wl,--out-implib,libpiemu.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,-Bstatic -lSDL2main -Wl,-Bdynamic -lSDL2 -lSDLmain libc33core.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ." D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lSDLmain collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
Using the msys64-2022-01-12.exe from here. https://www.mamedev.org/tools/
How I fix this? I will send the him the fix. Post this link to there.
W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB
|
|