I'm trying to build the C++ port of zxing on Windows, but scons fails with:
cl : Command line error D8021 : invalid numeric argument '/Wextra'
I have both VS2010 and MinGW installed, and scons tries to use the MSVC compiler, even though the SConscript file assumes gcc and use gcc-specific parameters, which causes the error.
How can I tell scons to use MinGW instead?
Is MinGW (MinGW-64) better than Cygwin in terms of MSVC alternative for creating Windows application? If your program will run only on Windows, then MinGW is likely the better choice. MinGW is designed to create Windows applications. It doesn't require users to install additional software to run your application.
In the Windows search bar, type 'settings' to open your Windows Settings. Search for Edit environment variables for your account. Choose the Path variable in your User variables and then select Edit. Select New and add the Mingw-w64 destination folder path to the system path.
The MinGW compiler is a well known and widely used software for installing GCC and G++ compilers for the C and C++ programming languages.
You need to install MingW or GCC on your system in order to Run c,c ++ programs. VS Code is an IDE(integrated development environment) where you can compile and run those codes.
Scons uses MSVC compiler by default on windows. To set mignw compiler use tools parameter while creating Environment object.
env = Environment(tools = ['mingw'])
And then use env.Program() instead of Program().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With