WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
vcfbauplusfe
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Nov 21, 2017 3:48 pm

WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcfbauplusfe »

Hi all out there,

played around with wxWidgets now and then during the last 15 years but with no
new installation I suffered such quarrels as I do right now.

Want to build wxWidgets with mingw32-make -f makefile.gcc.

Hope anybody could give me a hint.

Has anyone a VER shirt VERY easy makefile example that maybe would work with my
system / comp - constellation?

Thanks a lot.

Volker

Error code as below:

D:\_02_A_PROGS\_06_CODING\_00_IDEs\_03_wx_WIDGETS\3.0.3_exe\build\msw>mingw32-make -f makefile.gcc BUILD=release SHARED=1
if not exist gcc_mswudll mkdir gcc_mswudll
if not exist ..\..\lib\gcc_dll mkdir ..\..\lib\gcc_dll
if not exist ..\..\lib\gcc_dll\mswu mkdir ..\..\lib\gcc_dll\mswu
if not exist ..\..\lib\gcc_dll\mswu\wx mkdir ..\..\lib\gcc_dll\mswu\wx
if not exist ..\..\lib\gcc_dll\mswu\wx\setup.h copy ..\..\include\wx\msw\setup.h ..\..\lib\gcc_dll\mswu\wx\setup.h
1 Datei(en) kopiert.
if not exist ..\..\lib\gcc_dll\mswu\wx\msw mkdir ..\..\lib\gcc_dll\mswu\wx\msw
gcc -E "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_dll\mswu\wx\msw\rcdefs.h"
gcc -c -o gcc_mswudll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__ -D_UNICODE -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/chkconf.h:1222:0,
from ..\..\include/wx/platform.h:596,
from ..\..\include/wx/defs.h:27,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/msw/chkconf.h:19:10: error: #error "wxUSE_ACTIVEX must be defined."
# error "wxUSE_ACTIVEX must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:27:9: error: #error "wxUSE_CRASHREPORT must be defined."
# error "wxUSE_CRASHREPORT must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:35:9: error: #error "wxUSE_DC_CACHEING must be defined"
# error "wxUSE_DC_CACHEING must be defined"
^~~~~
..\..\include/wx/msw/chkconf.h:59:10: error: #error "wxUSE_INICONF must be defined."
# error "wxUSE_INICONF must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:67:10: error: #error "wxUSE_OLE must be defined."
# error "wxUSE_OLE must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:75:10: error: #error "wxUSE_OLE_AUTOMATION must be defined."
# error "wxUSE_OLE_AUTOMATION must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:83:9: error: #error "wxUSE_TASKBARICON_BALLOONS must be defined."
# error "wxUSE_TASKBARICON_BALLOONS must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:91:10: error: #error "wxUSE_UNICODE_MSLU must be defined."
# error "wxUSE_UNICODE_MSLU must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:99:10: error: #error "wxUSE_UXTHEME must be defined."
# error "wxUSE_UXTHEME must be defined."
^~~~~
..\..\include/wx/msw/chkconf.h:394:13: error: #error "wxUSE_DATAOBJ requires wxUSE_OLE"
# error "wxUSE_DATAOBJ requires wxUSE_OLE"
^~~~~
..\..\include/wx/msw/chkconf.h:414:13: error: #error "wxMediaCtl requires wxActiveXContainer"
# error "wxMediaCtl requires wxActiveXContainer"
^~~~~
In file included from ..\..\include/wx/platform.h:596:0,
from ..\..\include/wx/defs.h:27,
from ../../src/regex/regcustom.h:39,
from ../../src/regex/regguts.h:38,
from ../../src/regex/regcomp.c:33:
..\..\include/wx/chkconf.h:1630:13: error: #error "wxRearrangeCtrl requires wxCheckListBox"
# error "wxRearrangeCtrl requires wxCheckListBox"
^~~~~
mingw32-make: *** [makefile.gcc:5702: gcc_mswudll\wxregex_regcomp.o] Error 1
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by doublemax »

gcc 7.2.0 is probably too new. Pretty much every new major MinGW version in the last few years has broken wxWidgets compilation. Try a 6.x one with the latest wxWidgets version from GIT.

For a test, you could also try tdm-gcc-5.1.0 which is know to work.
http://tdm-gcc.tdragon.net/download
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by PB »

I am not really using MinGW32 but AFAIK:
* Version with GCC 5.3 works out of the box as expected.
* Version with GCC 6.3 does not work: https://trac.wxwidgets.org/ticket/17936.
* MinGW32 does not provide a version with GCC 7 yet. MinGW64 does but it is using MSYS2 so you cannot just use a commandline and a makefile, you need to use its shell and configure, see the wxWidgets docs. But I may be wrong about MinGW64, I have not used it myself...
vcf
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 06, 2015 11:30 am

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcf »

Hi all,

thanks for your answers - doesn't look too friendly ...

Replacing gcc 7 by gcc 5 i mingw32 isn't an easy job and
with VC 2015 I run in exactly the same problem.

Any good idea how to proceed?

What are the official recommendation for wsWidgets 3.0
to be rebuilt under win 10?

Thanks a lot.

Regards - Volker
vcf
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 06, 2015 11:30 am

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcf »

Hi all,

sorry, but me again ...

Found a mingw32 gcc 5.1.0 pair under

http://yasriady.blogspot.de/2015/08/how ... mingw.html

Installed it and tried to compile - Seems it wasn't a compiler problem - still the
same mess ...

Tried nmake -f makefile.vc but that gives me a missing "stdio.h" error.

Feel stuck - once really loved wxWidgets but start to get deeply frustrated.

Any other idea?!?

Thanks a lot - Regards - Volker
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by PB »

(I assume you have a clean install of wxWidgets, i.e., there are no leftovers from previous build attempts in WXWIN/lib and WXWIN/build/msw folders.)
vcf wrote:Replacing gcc 7 by gcc 5 i mingw32
Well, if you need C++ features available only for GCC 7 then you are out of luck. Otherwise there should be no problem at all? Which MinGW flavour are you actually using: does it come with MSYS(2)? If so, have you tried the configure way as described in the offical documentaion (install.txt, msys2-msw.txt)?
vcf wrote: with VC 2015 I run in exactly the same problem.

Any good idea how to proceed?

What are the official recommendation for wsWidgets 3.0
to be rebuilt under win 10?
There is no difference between compiling wxWidgets on e.g. Windows 7 and Windows 10. How did you try to build wxWidgets with MSVC 2015? I am using wxWidgets 3.1 but I believe even wxWidgets 3.0.3 should work out of the box either with makefiles or MSVS projects. While MSVS 2015 project files have been added only in wxWidgets 3.1, you should be able to open and autoconvert MSVC 2013 solution (wx_vc12.sln)?

I would recommend reading WXWIN/docs/msw/install.txt to refresh your memory. From my experience, building wxWidgets with MSVC is super easy: they provide easily customizable makefiles and MSVS project files and there is no dependency on third party libraries...
vcf
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 06, 2015 11:30 am

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcf »

[ MAKEFILE PART SOLVED ]

Hi all,

thnx for your comments.

Deleted gcc 7 with mingw32, installed gcc5.1.0 with approriate version
of mingw32 from previous mentioned source

Modified VCStudio 2015 (removed SDK 8.1)

Downloaded SDK 10

Deleted wxWigeds dir an reinstalled

Ran mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 CXXFLAGS="-std=gnu++11"
in the build/msw subdir.

Eth fine - build compiled.

Went to samples/minimal subdir and ran mingw32.... - BINGO

Argue it was a problem of gcc7 together with SDK 8.1 that might have caused
the probs but to be honest don't know exactly.

Thanks a lot once more.

Have a good time and take care all!

Regards - Volker
vcf
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 06, 2015 11:30 am

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcf »

Hi all,
Hi PB,

[/quote]

There is no difference between compiling wxWidgets on e.g. Windows 7 and Windows 10. How did you try to build wxWidgets with MSVC 2015? I am using wxWidgets 3.1 but I believe even wxWidgets 3.0.3 should work out of the box either with makefiles or MSVS projects. While MSVS 2015 project files have been added only in wxWidgets 3.1, you should be able to open and autoconvert MSVC 2013 solution (wx_vc12.sln)?
[quote][/quote]

Trying to build wxWIGETS within VS 2015 Community I run into the wxUSE_XXXXX errors.

Trying to run \sample\minimal i get the following error:

Severity Code Description Project File Line Source Suppression State Tool
Error LNK1104 cannot open file 'wxmsw30ud_core.lib' minimal D:\_02_A_PROGS\_06_CODING\_00_IDEs\_03_wx_WIDGETS\3.0.3_exe\samples\minimal\LINK 1 Build

Seems some kind of link error?!

Any hint appreciated.

Thanks a lot - Regards - Volker
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by PB »

You did not post any wxUSE_* related error.

Regarding the linker issue: Make sure that you that you added the proper folder to Additional Library Directiories in Linker/General Input (e.g. $(WXWIN)\lib\vc_lib) and the libraries are actually there.

Edit Sorry, I missed that you are trying to build a bundled sample and not your application. Did you successfully built the static debug configuration of wxWidgets with MSVC? The command line you posted for GCC was for release configuration. Obviously, a matching library and program build configuration have to be used...
vcf
Earned a small fee
Earned a small fee
Posts: 17
Joined: Tue Jan 06, 2015 11:30 am

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcf »

[VS-2015 part also SOLVED]

Hi all,
Hi PB,

thanks for your answers.

Meanwhile I succeeded to build also the VC12 version of wxWidgets
and also all the samples with mingw32-make and with VC12.

Also here not really the absolute glue why but it worked (very small part of samples
didn't but that's not really the point).

Thanks again - will mark the thread SOLVED from my other account.

Regards - Volker
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by PB »

FWIW, I was able to successfully build the current wxWidgets GIT master and minimal sample with MinGW-w64 with GCC 7.2 (using package MinGW-w64 i686-7.2.0-posix-dwarf-rt_v5-rev0)

Command line used

Code: Select all

mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++14"
So information I provided in one of my earlier posts in this thread regarding this toolchain using MSYS was incorrect. Sorry.
vcfbauplusfe
In need of some credit
In need of some credit
Posts: 4
Joined: Tue Nov 21, 2017 3:48 pm

Re: WIN10 mingw32 gcc 7.2.0 wxWidgets makefile build problem

Post by vcfbauplusfe »

Hello PB,

so you were able to build the gcc_lib with this mentioned configuration?

Would try to the next days.

Despite I played around with WxW now and then the last years
I am quite a newby in makefiles and VC12 coding (life was much easier
with vc6 and these times I even succeeded in realizing the one or other
small WxW test prog derived from minimal etc).

Today I feel like an oxen that I do not succeed in setting the correct
syntax of using WXW and relative paths ... grumble ...

Had the feeling that I could do that in C::B quite nice but ran in other
nogo anymore troubles (now downloaded 2.8.6 trying to follow the
wxWiki suggestion.

Nevertheless I would ask you for a little favour if possile:

Would you mind to provide me with a small VC12 or alike project
template file that doesn't lie in the sample folder and give me info
where and how to set the correct paths for my WXW?

Would be really great as I start to run in time delay bcz of all those quarrels
here.

Thanks a lot - Regards - Volker
Post Reply