cannot compile wxWidgets in windows with MingW
cannot compile wxWidgets in windows with MingW
I installed MingW, have correct PATH and git the source code.
WXWIN=c:\wxWidgets
MINGW=c:\mingw\bin
PATH has those
c:\mingw;c:\mingw\bin;c:\mingw\mingw64\bin;C:\mingw\libexec\gcc\mingw32\4.8.1
I use those steps in this site:
https://wiki.wxwidgets.org/Compiling_wx ... with_MinGW
My wxWidgets is the trunk (use git to pull down the source code)
version:
mingw32-make --version
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
I use this to compile:
mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"
The Error message is:
ar: gcc_mswu\monlib_framecmn.o: No such file or directory
makefile.gcc:5219: recipe for target '..\..\lib\gcc_lib\libwxmsw31u.a' failed
mingw32-make: *** [..\..\lib\gcc_lib\libwxmsw31u.a] Error 1
Thanks
WXWIN=c:\wxWidgets
MINGW=c:\mingw\bin
PATH has those
c:\mingw;c:\mingw\bin;c:\mingw\mingw64\bin;C:\mingw\libexec\gcc\mingw32\4.8.1
I use those steps in this site:
https://wiki.wxwidgets.org/Compiling_wx ... with_MinGW
My wxWidgets is the trunk (use git to pull down the source code)
version:
mingw32-make --version
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
I use this to compile:
mingw32-make SHELL=CMD.exe -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 MONOLITHIC=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"
The Error message is:
ar: gcc_mswu\monlib_framecmn.o: No such file or directory
makefile.gcc:5219: recipe for target '..\..\lib\gcc_lib\libwxmsw31u.a' failed
mingw32-make: *** [..\..\lib\gcc_lib\libwxmsw31u.a] Error 1
Thanks
Re: cannot compile wxWidgets in windows with MingW
That should be fine, unless there is a bug with that configuration. Try without MONOLITHIC=1, since that doesn't matter anyway with static libs.
Re: cannot compile wxWidgets in windows with MingW
Thanks
But I feel not comfortable of the error message.
It seems something of MinGW make utility cannot handle huge array of strings. In makefile.gcc I shorten some names string such as
"monolib" to "mnlib",
"monodll" to "mndll",
"basedll" to "bsdll",
"baselib" to "bslib"
"webviewdll" to "wbdll"
...
and it starts to compile. But I got new error:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...); error come out:
I do not know what to do.
But I feel not comfortable of the error message.
It seems something of MinGW make utility cannot handle huge array of strings. In makefile.gcc I shorten some names string such as
"monolib" to "mnlib",
"monodll" to "mndll",
"basedll" to "bsdll",
"baselib" to "bslib"
"webviewdll" to "wbdll"
...
and it starts to compile. But I got new error:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...); error come out:
I do not know what to do.
Re: cannot compile wxWidgets in windows with MingW
This is odd as this issue has been fixed in the trunk about a month ago: https://github.com/wxWidgets/wxWidgets/ ... fe5a37ffed, although the issue manifested only with MinGW32 distribution using GCC 6.walker wrote:and it starts to compile. But I got new error:
c:\mingw\include\stdio.h:345:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__mingw__snprintf'
extern int __mingw_stdio_redirect__(snprintf)(char*, size_t, const char*, ...); error come out:
As for the known issue of missing letters in paths, have you tried to build without using the shell parameter?
BTW, AFAIK the "-fno-keep-inline-dllexport" parameter is of no use for static builds.
Last edited by PB on Thu Jan 04, 2018 9:02 am, edited 1 time in total.
Re: cannot compile wxWidgets in windows with MingW
The real reason for the missing characters is still a mystery, but it's related to the MONOLITHIC option:
https://wiki.wxwidgets.org/Compiling_wx ... HIC_option
Instead of the workaround in the wiki article, i'd suggest to not use MONOLITHIC.
https://wiki.wxwidgets.org/Compiling_wx ... HIC_option
Instead of the workaround in the wiki article, i'd suggest to not use MONOLITHIC.
Use the source, Luke!
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: cannot compile wxWidgets in windows with MingW
Not related to your error, but you don't need all of these MinGW related stuff in your path: "C:\<path-to-your-mingw>\bin" should be enough.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: cannot compile wxWidgets in windows with MingW
You are wrong; if he did your fix then the "SHELL=CMD.exe" would not be needed.eranon wrote:Not related to your error, but you don't need all of these MinGW related stuff in your path: "C:\<path-to-your-mingw>\bin" should be enough.
And, the problem would likely go away.
I use monolithic all the time; and, I only have issues when I also use "SHELL=CMD.exe".
Tim S.
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: cannot compile wxWidgets in windows with MingW
What fix? I don't give any fix here. I just say that his PATH was overcrowded.stahta01 wrote:You are wrong; if he did your fix then the "SHELL=CMD.exe" would not be needed.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: cannot compile wxWidgets in windows with MingW
The reason for adding "SHELL=CMD.exe" is because the PATH has sh.exe in it.eranon wrote:What fix? I don't give any fix here. I just say that his PATH was overcrowded.stahta01 wrote:You are wrong; if he did your fix then the "SHELL=CMD.exe" would not be needed.
If you change the path to only the MinGW Compiler; you no longer need "SHELL=CMD.exe".
Tim S.
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: cannot compile wxWidgets in windows with MingW
I agree (even if it depends on your build environment; I'm used to go from native Windows one about wxWidgets -- w/o msys, msys2 or cygwin), Tim, but I didn't extrapolate to the content of its overall PATH content (he didn't show his overall PATH). I only talked about the part about MinGW (where he said he added "c:\mingw;c:\mingw\bin;c:\mingw\mingw64\bin;C:\mingw\libexec\gcc\mingw32\4.8.1").
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]