MinGW-64 and wxWidgets

546 views
Skip to first unread message

ArbolOne

unread,
May 10, 2015, 9:02:31 PM5/10/15
to wxWidges MailingList
In my laptop, running Win8.1, I want to build wxWidgets-3.0.2. To do this I have downloaded MinGW-64, MSYS2 and MSYS1.10 {for the make.exe, which MSYS2 is missing}. I have tested the 64bit compiler and the MSYSs to a satisfaction using NetBeans IDE.
This commands return the right output
echo %MINGW64%
echo %WXWIN%
 
I then
CD %WXWIN%\build\msw
 
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11 -m64" CPP="gcc -E -D_M_AMD64" DEBUG_FLAG=1 BUILD=release UNICODE=1 MONOLITHIC=1 USE_OPENGL=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1 2>wxWidgets-3.0.2_build.txt
 
fails saying:
 
process_begin: CreateProcess(NULL, C:/dev/msys64/msys/bin/ -c "if not exist gcc_mswu mkdir gcc_mswu", ...) failed.
make (e=5): Access is denied.
 
mingw32-make: [gcc_mswu] Error 5 (ignored)
process_begin: CreateProcess(NULL, C:/dev/msys64/msys/bin/ -c "if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib", ...) failed.
make (e=5): Access is denied.
 
mingw32-make: *** [..\..\lib\gcc_lib] Error 5
 
What else do I have to do? where did I go wrong?

Igor Korot

unread,
May 10, 2015, 9:18:03 PM5/10/15
to wx-u...@googlegroups.com
Hi,

On Sun, May 10, 2015 at 9:02 PM, ArbolOne <Arbo...@hotmail.ca> wrote:
> In my laptop, running Win8.1, I want to build wxWidgets-3.0.2. To do this I
> have downloaded MinGW-64, MSYS2 and MSYS1.10 {for the make.exe, which MSYS2
> is missing}. I have tested the 64bit compiler and the MSYSs to a
> satisfaction using NetBeans IDE.
> This commands return the right output

Are you sure they installed correctly?
Can you just run mkdir command?

Thank you.

> echo %MINGW64%
> echo %WXWIN%
>
> I then
> CD %WXWIN%\build\msw
>
> mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11 -m64" CPP="gcc -E
> -D_M_AMD64" DEBUG_FLAG=1 BUILD=release UNICODE=1 MONOLITHIC=1 USE_OPENGL=1
> RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1 2>wxWidgets-3.0.2_build.txt
>
> fails saying:
>
> process_begin: CreateProcess(NULL, C:/dev/msys64/msys/bin/ -c "if not exist
> gcc_mswu mkdir gcc_mswu", ...) failed.
> make (e=5): Access is denied.
>
> mingw32-make: [gcc_mswu] Error 5 (ignored)
> process_begin: CreateProcess(NULL, C:/dev/msys64/msys/bin/ -c "if not exist
> ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib", ...) failed.
> make (e=5): Access is denied.
>
> mingw32-make: *** [..\..\lib\gcc_lib] Error 5
>
> What else do I have to do? where did I go wrong?
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users

Eran Ifrah

unread,
May 10, 2015, 11:42:47 PM5/10/15
to wx-u...@googlegroups.com
ArbolOne, you are mixing here between MSYS and CMD builds which does not use MSYS shell for building wxWidgets.
If you plan on using MSYS, than you should use configure and build wxWidgets from within the MSYS shell (you should not use mingw32-make but rather make, IOW, use the toolchain provided by MSYS, from within the MSYS shell)

If you plan on using MinGW32 without MSYS (the steps you used so far are for building wxWidgets from within a CMD and not from MSYS) than you should remove MSYS 'bin' path from the PATH environment variable.

Also, when building from plain old CMD, always pass SHELL=cmd.exe in your build line. If your mingw32-make is recent enough, it honour it and will not attempt to invoke sh.exe but rather cmd.exe. 

Last note, I always recommend people to use TDM-GCC 64 compiler (4.9.2) its the most reliable one out there with an up-to-date toolchain


Bob Paddock

unread,
May 11, 2015, 8:18:13 AM5/11/15
to wx-u...@googlegroups.com
> Last note, I always recommend people to use TDM-GCC 64 compiler (4.9.2) its
> the most reliable one out there with an up-to-date toolchain

There is also the http://nuwen.net/mingw.html distro that usually
keeps up with GCC releases, currently 5.1.
It also has the advantage of coming with Boost and some other useful
items prebuilt.

Vadim Zeitlin

unread,
May 11, 2015, 9:48:10 AM5/11/15
to wxWidges MailingList
On Sun, 10 May 2015 21:02:29 -0400 ArbolOne wrote:

A> In my laptop, running Win8.1, I want to build wxWidgets-3.0.2. To do
A> this I have downloaded MinGW-64, MSYS2 and MSYS1.10 {for the make.exe,
A> which MSYS2 is missing}.

You have been already given good advice by Fulvio, which you chose to
ignore, so I'm not sure how useful is it, but let me try to give you
another advice: when you fail to do something, you need to understand what
the problem is instead of just starting to do something else without really
understanding what are you doing. If you think you don't have time to spend
on understanding this, let me assure you that you will waste much more time
if you do not understand it.

In this particular case, you've started using TDM-GCC (or at least this
was your last attempt). It's true that there is a bug (which has already
been fixed in 3.1 and which I'll try to fix in 3.0) when using -std=c++11
with it, however you've been told, repeatedly, that a trivial workaround is
to just use -std=gnu++11 instead. What's wrong with just doing this?

Of course, MinGW64 works too. I am less sure about mixing MSYS2 and MSYS,
I've never heard of anybody doing it so I'm not sure if it works.

A> mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11 -m64" CPP="gcc -E -D_M_AMD64" DEBUG_FLAG=1 BUILD=release UNICODE=1 MONOLITHIC=1 USE_OPENGL=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1 2>wxWidgets-3.0.2_build.txt
A>
A> fails saying:
A>
A> process_begin: CreateProcess(NULL, C:/dev/msys64/msys/bin/ -c "if not exist gcc_mswu mkdir gcc_mswu", ...) failed.
A> make (e=5): Access is denied.
A>
A> mingw32-make: [gcc_mswu] Error 5 (ignored)
A> process_begin: CreateProcess(NULL, C:/dev/msys64/msys/bin/ -c "if not exist ..\..\lib\gcc_lib mkdir ..\..\lib\gcc_lib", ...) failed.
A> make (e=5): Access is denied.
A>
A> mingw32-make: *** [..\..\lib\gcc_lib] Error 5
A>
A> What else do I have to do? where did I go wrong?

You're using makefiles for cmd.exe shell with Unix (bash?) shell. This
can't work and https://github.com/wxWidgets/wxWidgets/blob/master/docs/msw/install.txt#L155
clearly (IMO) explains that you must either use configure in Unix-like
environment or use DOS command prompt if you use the makefiles.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Developer

unread,
May 11, 2015, 12:42:55 PM5/11/15
to wxWidges MailingList
You have been already given good advice by Fulvio, which you chose to
ignore, so I'm not sure how useful is it, but let me try to give you
another advice: when you fail to do something, you need to understand what
the problem is instead of just starting to do something else without really
understanding what are you doing. If you think you don't have time to spend
on understanding this, let me assure you that you will waste much more time
if you do not understand it.
 
The only advice I received from Fulvio was an English statement that does cannot be plot or inserted in any algorithm or computer command.
... yet seem to be surprised by this warning which is, of course, to be expected as you didn't build the release configuration.
and as you can clearly identify in the nature of my question, it is obvious that I am a complete novice on *nix style of "installing" an application/toolkit/etc. Remember, novice, what you used to be when you first started using computers.
Microsoft Programming Language Flagship is .Net, and as so, all need be done is installing Visual Studio, and everything developers need to become productive is included.  In Windows we don’t have to look for the proper folder, let alone a compiler version or a special compiler built to compile the .Net toolkit. I know, I know, we are spoiled, but I use this as my excuse for my ignorance. I am so used to the modern way of doing things.
 
 
In this particular case, you've started using TDM-GCC (or at least this
was your last attempt). It's true that there is a bug (which has already
been fixed in 3.1 and which I'll try to fix in 3.0) when using -std=c++11
with it, however you've been told, repeatedly, that a trivial workaround is
to just use -std=gnu++11 instead. What's wrong with just doing this?
 
As you can see in the example I provided and that you, yourself, quoted in your reply, I am using –std=gnu++11 as oppose to what you suggest is my mistake:
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11 -m64" CPP="gcc -E -D_M_AMD64" DEBUG_FLAG=1 BUILD=release UNICODE=1 MONOLITHIC=1 USE_OPENGL=1 RUNTIME_LIBS=static USE_RTTI=0 USE_EXCEPTIONS=1 2>wxWidgets-3.0.2_build.txt
 
 
Of course, MinGW64 works too. I am less sure about mixing MSYS2 and MSYS,
I've never heard of anybody doing it so I'm not sure if it works.
It was a mistake to mention MSYS, because it confused you. The only reason I mentioned MSYS2/1 was because I am using NetBeans as my IDE, but that will change, I’ll probably switch to Code Blocks. This is not important. I am building the toolkit using the DOS’ cmd.exe
 
You're using makefiles for cmd.exe shell with Unix (bash?) shell. This
clearly (IMO) explains that you must either use configure in Unix-like
environment or use DOS command prompt if you use the makefiles.
 
Lines 233 to 237 of the above linked document deals with the building of the toolkit, In the it is recommended that we use the following
“mingw32-make -f makefile.gcc BUILD=release SHARED=1”
 
Why then, I wonder, other people’s suggestions are to use a much longer list of parameters, such is in the example I provided.
 
Bottom line is, if you tell me that “mingw32-make -f makefile.gcc BUILD=release SHARED=1” is all I need to have the toolkit up running, I will just use that syntax. It is your work that is being tested and I am sure you want it to succeed. Just remember, I will be deploying applications A SAP and if things don’t go well then, I will be recalling this email VZ.
 
Regards,
 
 
Regards to you as well.
 
 
 
Reply all
Reply to author
Forward
0 new messages