phyml
phyml copied to clipboard
PhyML Compiling Error on Windows (MSYS2)
Hello,
I've been trying to compile a Windows executable from the Spring 2022 release, but I keep running into undefined reference to 'WinMain@16'
errors when running make
. I've tried this through both through MSYS2 on a Windows 10 machine and while trying to cross-compile with mingw on an Ubuntu 20.04.4 machine with the same result.
My apologies if there's a common fix to this - I'm not experienced at all with C compilers.
Details of my system setup and the error are below, while console output from autogen
, configure
, and make
are attached
Thank you for your help!
Setup
Windows 10, MSYS2 fresh install (msys2-x86_64-20220503)
Installed packages:
- base-devel
- mingw-w64-i686-toolchain
- autoconf-wrapper
- automake-wrapper
Attempting to compile phyml-3.3.20220408 (Spring 2022 release) in MSYS2 MINGW x86
Error from make:
i686-w64-mingw32-gcc -std=c99 -O3 -fomit-frame-pointer -funroll-loops -Wall -Winline -finline -march=native -o phyml.exe -lm
C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.3.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.3.0/../../../../lib/libmingw32.a(lib32_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@16'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:1134: phyml.exe] Error 1
make[2]: Leaving directory '/c/users/duffy/downloads/phyml-3.3.20220408/src'
make[1]: *** [Makefile:365: all-recursive] Error 1
make[1]: Leaving directory '/c/users/duffy/downloads/phyml-3.3.20220408'
make: *** [Makefile:306: all] Error 2