MinGW make error
Brought to you by:
skarg
Hi,
I'm having an issue with getting the stack to build the basic examples. select() seems to be declared twice and I have been unable to find a solution or any topics related top this issue. Any insight to where I should look would be very appreciated.
Thank you
Anonymous
It is likely that the MSYS2 environment is not configured correctly.
Some background for configuration is here:
https://stackoverflow.com/questions/48031258/mingw64-and-conflicting-declaration-of-c-function-int-select
You can check the environment using
uname
and usinggcc -dumpmachine
You can setup the MSYS2 for MinGW32 environment using the appropriate launcher.
https://www.msys2.org/wiki/Launchers/
The check results:
To install from MSYS2, you can use winget and pacman:
Launch MSYS and install the MinGW32 toolchain:
Note that I currently get a Linker (ld.exe) error when using MSYS MinGW32 shell.
I use git-bash with my
~/.bashrc
file configured as:and the checks return:
and
My git-bash PATH starts with:
/c/msys64/mingw32/bin:
Last edit: Steve Karg 2023-05-12
For compiling under MinGW32, MSYS2 installation is:
Start MSYS, and install MinGW32.
Then edit ~/.bashrc file and add:
Exit MSYS.
Start MSYS profile for MinGW32.
Verify MSYS profile:
Verify GCC is targeting i686:
Verify make is built for Windows32:
Thanks Steve! Those solved the issue.