MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error Topic is solved

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
headkase
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 27, 2018 3:40 pm

MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by headkase » Sun May 27, 2018 3:52 pm

Using MinGW-Builds GCC 8.1.0:

https://sourceforge.net/projects/mingw- ... posix/seh/

Using this build line for WxWidgets 3.1.1:

Code: Select all

mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=1 MONOLITHIC=1 CFG=64 CXXFLAGS="-fno-keep-inline-dllexport"
I end up with the following error:

Code: Select all

In file included from ../../src/common/dynload.cpp:25:
..\..\include/wx/msw/private.h: In static member function 'static void* AutoHANDLE<INVALID_VALUE>::InvalidHandle()':
..\..\include/wx/msw/private.h:148:49: error: invalid static_cast from type 'long long unsigned int' to type 'HANDLE' {aka 'void*'}
         return static_cast<HANDLE>(INVALID_VALUE);
                                                 ^
In file included from ..\..\include/wx/gdicmn.h:19,
                 from ..\..\include/wx/event.h:20,
                 from ..\..\include/wx/window.h:18,
                 from ..\..\include/wx/msw/private.h:21,
                 from ../../src/common/dynload.cpp:25:
..\..\include/wx/module.h: In member function 'wxModule* const& wxModuleList::const_iterator::operator*() const':
..\..\include/wx/list.h:834:60: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
                 { return *(pointer_type)m_node->GetDataPtr(); }             \
                                                            ^
..\..\include/wx/list.h:1071:5: note: in expansion of macro 'WX_DECLARE_LIST_4'
     WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP_NONE)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1076:5: note: in expansion of macro 'WX_DECLARE_LIST_3'
     WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1100:5: note: in expansion of macro 'WX_DECLARE_LIST_2'
     WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/module.h:21:1: note: in expansion of macro 'WX_DECLARE_USER_EXPORTED_LIST'
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\include/wx/module.h: In member function 'wxModule* const& wxModuleList::const_reverse_iterator::operator*() const':
..\..\include/wx/list.h:926:60: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
                 { return *(pointer_type)m_node->GetDataPtr(); }             \
                                                            ^
..\..\include/wx/list.h:1071:5: note: in expansion of macro 'WX_DECLARE_LIST_4'
     WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP_NONE)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1076:5: note: in expansion of macro 'WX_DECLARE_LIST_3'
     WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1100:5: note: in expansion of macro 'WX_DECLARE_LIST_2'
     WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/module.h:21:1: note: in expansion of macro 'WX_DECLARE_USER_EXPORTED_LIST'
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ..\..\include/wx/log.h:63,
                 from ..\..\include/wx/msw/private.h:18,
                 from ../../src/common/dynload.cpp:25:
..\..\include/wx/dynload.h: In member function 'void wxDLManifest_wxImplementation_HashTable::ResizeTable(size_t)':
..\..\include/wx/hashmap.h:402:40: warning: cast between incompatible function types from 'wxDLManifest_wxImplementation_HashTable::size_type (*)(wxDLManifest_wxImplementation_HashTable::Self*, wxDLManifest_wxImplementation_HashTable::Node*)' {aka 'long long unsigned int (*)(wxDLManifest_wxImplementation_HashTable*, wxDLManifest_wxImplementation_HashTable::Node*)'} to '_wxHashTableBase2::BucketFromNode' {aka 'long unsigned int (*)(_wxHashTableBase2*, _wxHashTable_NodeBase*)'} [-Wcast-function-type]
                        (BucketFromNode)GetBucketForNode,\
                                        ^~~~~~~~~~~~~~~~
..\..\include/wx/hashmap.h:402:40: note: in definition of macro '_WX_DECLARE_HASHTABLE'
                        (BucketFromNode)GetBucketForNode,\
                                        ^~~~~~~~~~~~~~~~
..\..\include/wx/hashmap.h:710:5: note: in expansion of macro '_WX_DECLARE_HASH_MAP'
     _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \
     ^~~~~~~~~~~~~~~~~~~~
..\..\include/wx/dynload.h:30:1: note: in expansion of macro 'WX_DECLARE_STRING_HASH_MAP_WITH_DECL'
 WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPluginLibrary *, wxDLManifest,
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\include/wx/dynload.h: In member function 'void wxDLManifest_wxImplementation_HashTable::HashCopy(const Self&)':
..\..\include/wx/hashmap.h:414:40: warning: cast between incompatible function types from 'wxDLManifest_wxImplementation_HashTable::size_type (*)(wxDLManifest_wxImplementation_HashTable::Self*, wxDLManifest_wxImplementation_HashTable::Node*)' {aka 'long long unsigned int (*)(wxDLManifest_wxImplementation_HashTable*, wxDLManifest_wxImplementation_HashTable::Node*)'} to '_wxHashTableBase2::BucketFromNode' {aka 'long unsigned int (*)(_wxHashTableBase2*, _wxHashTable_NodeBase*)'} [-Wcast-function-type]
                        (BucketFromNode)GetBucketForNode, \
                                        ^~~~~~~~~~~~~~~~
..\..\include/wx/hashmap.h:414:40: note: in definition of macro '_WX_DECLARE_HASHTABLE'
                        (BucketFromNode)GetBucketForNode, \
                                        ^~~~~~~~~~~~~~~~
..\..\include/wx/hashmap.h:710:5: note: in expansion of macro '_WX_DECLARE_HASH_MAP'
     _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \
     ^~~~~~~~~~~~~~~~~~~~
..\..\include/wx/dynload.h:30:1: note: in expansion of macro 'WX_DECLARE_STRING_HASH_MAP_WITH_DECL'
 WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPluginLibrary *, wxDLManifest,
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make: *** [makefile.gcc:6663: gcc_mswudll64\monodll_dynload.o] Error 1
This is a 64-bit compiler. The previous MinGW-Builds 7.3.0, also 64-bit, compiles WxWidgets 3.1.1 correctly. Any suggestions I could try to fix this? Thank you in advance.

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by doublemax » Sun May 27, 2018 6:44 pm

Pretty much every new MinGW version breaks wxWidgets compilation, so usually it's not the best idea to use the latest MinGW version.

Please open a ticket at http://trac.wxwidgets.org/
Use the source, Luke!

headkase
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 27, 2018 3:40 pm

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by headkase » Sun May 27, 2018 7:04 pm

doublemax wrote:Pretty much every new MinGW version breaks wxWidgets compilation, so usually it's not the best idea to use the latest MinGW version.

Please open a ticket at http://trac.wxwidgets.org/
I would open a ticket but the trac software doesn't want to send me a verify email. My email is in this format: [email protected]

Just to note, I also tried to build with the most current GIT of wxWidgets with the same results. Using "-fpermissive" also didn't massage it the right way.

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by doublemax » Sun May 27, 2018 7:51 pm

In that case try posting on the wx-users group:
https://groups.google.com/forum/#!forum/wx-users
Use the source, Luke!

headkase
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 27, 2018 3:40 pm

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by headkase » Sun May 27, 2018 8:16 pm

doublemax wrote:In that case try posting on the wx-users group:
https://groups.google.com/forum/#!forum/wx-users
Posted here: https://mail.google.com/mail/u/0?ui=2&i ... 0458987007

Thanks.

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by doublemax » Sun May 27, 2018 9:59 pm

Use the source, Luke!

headkase
In need of some credit
In need of some credit
Posts: 4
Joined: Sun May 27, 2018 3:40 pm

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by headkase » Mon May 28, 2018 8:09 am

Right on, thank you - that was a fast turn-around!

gustxw
In need of some credit
In need of some credit
Posts: 8
Joined: Thu Aug 08, 2019 8:41 pm

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by gustxw » Thu Aug 08, 2019 8:45 pm

Hello is it true newer versions of mingw break wx widgets build i have been having this problem im using codeblocks 17.2 and mingw tho idk if the mingw being used is the codeblocks one cause ive noticed in some cases it finds the mingw i have installed in C:\ but regardless when i run

C:\Users\gustx\Desktop\wxWidgets-3.1.2\build\msw>mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 MONOLITHIC=1 BUILD=release

i get

gcc -E "..\..\include\wx\msw\genrcdefs.h" > "..\..\lib\gcc_lib\mswu\wx\msw\rcdefs.h"
process_begin: CreateProcess(NULL, C:/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler/ -c "gcc -E \"..\..\include\wx\msw\genrcdefs.h\" > \"..\..\lib\gcc_lib\mswu\wx\msw\rcdefs.h\"", ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make: *** [makefile.gcc:5743: ..\..\lib\gcc_lib\mswu\wx\msw\rcdefs.h] Error 2

have i just hopelessly been trying to get this to work
what version of mingw can i download that will work and from what url?will i have to uninstall my current mingw?

User avatar
doublemax
Moderator
Moderator
Posts: 13985
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by doublemax » Thu Aug 08, 2019 9:32 pm

I don't think this is a problem with the MinGW version. Open a console window and check the PATH variable. Maybe there are other compilers/toolchains installed.
Use the source, Luke!

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2020
Joined: Sun Jan 03, 2010 5:45 pm

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

Post by PB » Thu Aug 08, 2019 9:42 pm

In addition to scanning %PATH%, you can also use the where command in the console, e.g.

Code: Select all

where gcc.exe
Also, what is this path from your error listing?

Code: Select all

C:/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler/ 

Post Reply