Problems building wxWidgets 3.1.0 with GTK on Win7 using MSYS2/MINGW

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building wxWidgets 3.1.0 with GTK on Win7 using MSYS2/MINGW

Parduz
I have installed MSYS2 following the instructions on the linked site, and from that shell installed
  • mingw-w64-x86_64-toolchain
  • mingw-w64-x86_64-gcc
  • mingw-w64-x86_64-wxWidgets
and i was able to build the "hello-c++-wxwidgets" sample.

Then i've installed mingw-w64-x86_64-gtk2, downloaded the wxWidgets 3.1.0 sources and extracted the folder, and i was able to run
../configure --with-gtk --enable-debug --disable-shared
with success.

But now the make command fails:
Calzolari@Ottici-HP MINGW64 ~/wxwidgets-3.1.0/buildforwin
$ make
/home/calzolari/wxwidgets-3.1.0/buildforwin/bk-deps gcc -c -o wxregex_regcomp.o -DNDEBUG -D__WXGTK__   -D_FILE_OFFSET_BITS=64 -I/home/calzolari/wxwidgets-3.1.0/buildforwin/lib/wx/include/gtk2-unicode-static-3.1 -I../include -mms-bitfields -pthread -mms-bitfields -IC:/msys64/mingw64/include/gtk-2.0 -IC:/msys64/mingw64/lib/gtk-2.0/include -IC:/msys64/mingw64/include/pango-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/atk-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/include/pixman-1 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/gdk-pixbuf-2.0 -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -pthread -Wall -Wundef -g -O0  ../src/regex/regcomp.c
In file included from ../include/wx/platform.h:485:0,
                 
from ../include/wx/defs.h:20,
                 
from ../src/regex/regcustom.h:39,
                 
from ../src/regex/regguts.h:38,
                 
from ../src/regex/regcomp.c:33:
../include/wx/chkconf.h:1671:13: error: #error "wxRearrangeCtrl requires wxCheckListBox"
 
#           error "wxRearrangeCtrl requires wxCheckListBox"
             
^~~~~
make
: *** [Makefile:14761: wxregex_regcomp.o] Error 1

What should i do?

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: Problems building wxWidgets 3.1.0 with GTK on Win7 using MSYS2/MINGW

Vadim Zeitlin-4
On Thu, 16 Feb 2017 08:26:22 -0800 (PST) Parduz wrote:

P> I have installed MSYS2 <http://www.msys2.org/> following the instructions
P> on the linked site, and from that shell installed
P>
P>    - mingw-w64-x86_64-toolchain
P>    - mingw-w64-x86_64-gcc
P>    - mingw-w64-x86_64-wxWidgets
P>
P> and i was able to build the "hello-c++-wxwidgets" sample.

 Why did you install wxMSW if you need wxGTK? You can have multiple
versions and builds of wxWidgets on the same system, but it's simpler not
to deal with this if you don't need to.

P> Then i've installed mingw-w64-x86_64-gtk2, downloaded the wxWidgets 3.1.0
P> sources and extracted the folder, and i was able to run
P> ../configure --with-gtk --enable-debug --disable-shared
P> with success.
P>
P> But now the make command fails:
P> Calzolari@Ottici-HP MINGW64 ~/wxwidgets-3.1.0/buildforwin
P> $ make
P> /home/calzolari/wxwidgets-3.1.0/buildforwin/bk-deps gcc -c -o
P> wxregex_regcomp.o -DNDEBUG -D__WXGTK__   -D_FILE_OFFSET_BITS=64 -I/home/
P> calzolari/wxwidgets-3.1.0/buildforwin/lib/wx/include/gtk2-unicode-static-3.1
P> -I../include -mms-bitfields -pthread -mms-bitfields -IC:/msys64/mingw64/
P> include/gtk-2.0 -IC:/msys64/mingw64/lib/gtk-2.0/include -IC:/msys64/mingw64/
P> include/pango-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/
P> include/atk-1.0 -IC:/msys64/mingw64/include/cairo -IC:/msys64/mingw64/
P> include/pixman-1 -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2
P> -IC:/msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/harfbuzz -
P> IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include
P> -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include/freetype2 -IC:
P> /msys64/mingw64/include -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/
P> mingw64/include/libpng16 -IC:/msys64/mingw64/include/gdk-pixbuf-2.0 -IC:
P> /msys64/mingw64/include/libpng16 -IC:/msys64/mingw64/include/glib-2.0 -IC:
P> /msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include -pthread -
P> Wall -Wundef -g -O0  ../src/regex/regcomp.c
P> In file included from ../include/wx/platform.h:485:0,
P>                  from ../include/wx/defs.h:20,
P>                  from ../src/regex/regcustom.h:39,
P>                  from ../src/regex/regguts.h:38,
P>                  from ../src/regex/regcomp.c:33:
P> ../include/wx/chkconf.h:1671:13: error: #error "wxRearrangeCtrl requires
P> wxCheckListBox"
P>  #           error "wxRearrangeCtrl requires wxCheckListBox"
P>              ^~~~~
P> make: *** [Makefile:14761: wxregex_regcomp.o] Error 1
P>
P> What should i do?

 You need to understand what's going on before deciding what to do. I
initially thought that your build was picking the already installed
wxWidgets headers, but unless it's some really ancient version,
wxUSE_CHECKLISTBOX should still be defined in them, so it must be something
else. Try removing the globally installed wxMSW package just in case. If
this doesn't help, you really need to find the setup.h file with
wxUSE_CHECKLISTBOX defined as 0 in it, I have no idea where does it come
from, but you should be able to find it.

 Regards,
VZ

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

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Problems building wxWidgets 3.1.0 with GTK on Win7 using MSYS2/MINGW

Parduz
In reply to this post by Parduz
Still unable to build the libraries in Win7 for Arm-Linux.
These are all the steps i've done.

1 - I removed everything and started again from a clean MSYS2 install.
2 - In the MSYS2 shell:
pacman -Syu
3 - As suggested, closed the window and reopened it:
4 - (from the .bash_history file);
pacman -Syu
exit
pacman
-Syu
pacman
-S mingw-w64-x86_64-gtk2
pacman
-S mingw-w64-x86_64-gtk3
pacman
-S mingw-w64-i686-gtk2
pacman
-S mingw-w64-i686-gtk3
pacman
-S base-devel
pacman
-S make
make
--version
exit

5 - Unzipped the Linaro toolchain gcc-linaro-4.9-2016.02-i686-mingw32_arm-linux-gnueabihf in C:\msys2-64\ToolChains\Linaro\gcc-4.9-2016.02 (with the usual problem of some .h file being renamed 'cause same name but with different case)
6 - Added PATH="/ToolChains/Linaro/gcc-4.9-2016.02/bin:${PATH}" in the .bash_profile file.
7 - Unzipped the https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.0/wxWidgets-3.1.0.zip file in $HOME/wxWidgets-3.1.0-win (C:\msys2-64\home\Calzolari\wxWidgets-3.1.0-Win)
8 - Made a dir "BuildForBBB" inside it,
9 - Made "x86_64" and "src/expat/x86_64" in it 'cause the gcc exits with an error if these folders does'nt exist
10 - Opened the MSYS2-MinGW32 shell and:
echo $PATH
cd wxWidgets
-3.1.0-Win/BuildForBBB
../configure --disable-shared --enable-debug --host=arm-linux-gnueabihf --with-gtk --with-libtiff=no --with-opengl=no
(--with-libtiff=no 'cause it makes arm-linux-gnueabihf-gcc.exe to crash with the Windows "Program Has Stopped Working" Error Dialog)
Here's the config.log
11 - Removed -mms-bitfields option from the CPPFLAGS line in the resulting makefile 'cause the gcc does'nt recognize it.
12 -
$ make
rm
-f /home/Calzolari/wxWidgets-3.1.0-Win/BuildForBBB/lib/libwxregexu-3.1-arm-linux-gnueabihf.a
arm
-linux-gnueabihf-ar rc /home/Calzolari/wxWidgets-3.1.0-Win/BuildForBBB/lib/libwxregexu-3.1-arm-linux-gnueabihf.a wxregex_regcomp.o wxregex_regexec.o wxregex_regerror.o wxregex_regfree.o
arm
-linux-gnueabihf-ranlib /home/Calzolari/wxWidgets-3.1.0-Win/BuildForBBB/lib/libwxregexu-3.1-arm-linux-gnueabihf.a
/home/Calzolari/wxWidgets-3.1.0-Win/BuildForBBB/bk-deps arm-linux-gnueabihf-g++ -c -o baselib_strconv.o  -D__WXGTK__      -DWXBUILDING   -I../src/jpeg -I../src/png -I../src/zlib -I../src/regex -I../src/expat/lib -DwxUSE_GUI=0 -DwxUSE_BASE=1 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/home/Calzolari/wxWidgets-3.1.0-Win/BuildForBBB/lib/wx/include/arm-linux-gnueabihf-gtk2-unicode-static-3.1 -I../include -pthread -I/mingw32/include/gtk-2.0 -I/mingw32/lib/gtk-2.0/include -I/mingw32/include/pango-1.0 -I/mingw32/include/cairo -I/mingw32/include/atk-1.0 -I/mingw32/include/cairo -I/mingw32/include/pixman-1 -I/mingw32/include -I/mingw32/include/freetype2 -I/mingw32/include/libpng16 -I/mingw32/include/harfbuzz -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -I/mingw32/include/freetype2 -I/mingw32/include -I/mingw32/include/harfbuzz -I/mingw32/include -I/mingw32/include/libpng16 -I/mingw32/include/gdk-pixbuf-2.0 -I/mingw32/include/libpng16 -I/mingw32/include/glib-2.0 -I/mingw32/lib/glib-2.0/include -I/mingw32/include -pthread -g -O0  ../src/common/strconv.cpp
In file included from ../src/common/strconv.cpp:43:0:
C
:/msys2-64/mingw32/include/iconv.h:25:29: error: ISO C++ forbids declaration of '__declspec' with no type [-fpermissive]
 
extern __declspec (dllimport) int _libiconv_version; /* Likewise */
                             
^
C
:/msys2-64/mingw32/include/iconv.h:25:29: warning: '__declspec' initialized and declared 'extern'
C
:/msys2-64/mingw32/include/iconv.h:25:20: error: 'dllimport' was not declared in this scope
 
extern __declspec (dllimport) int _libiconv_version; /* Likewise */
                   
^
C
:/msys2-64/mingw32/include/iconv.h:25:31: error: expected ',' or ';' before 'int'
 
extern __declspec (dllimport) int _libiconv_version; /* Likewise */
                               
^
../src/common/strconv.cpp:3333:19: warning: 'gs_wxConvLibcinstance' defined but not used [-Wunused-variable]
     
static klass* gs_##name##instance = wxGet_##name##Ptr()
                   
^
../src/common/strconv.cpp:3348:5: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV2'
     WX_DEFINE_GLOBAL_CONV2
(wxMBConv, wxMBConvLibc, wxConvLibc, wxEMPTY_PARAMETER_VALUE);
     
^
../src/common/strconv.cpp:3333:19: warning: 'gs_wxConvUTF8instance' defined but not used [-Wunused-variable]
     
static klass* gs_##name##instance = wxGet_##name##Ptr()
                   
^
../src/common/strconv.cpp:3336:5: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV2'
     WX_DEFINE_GLOBAL_CONV2
(klass, klass, name, ctor_args)
     
^
../src/common/strconv.cpp:3357:1: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV'
 WX_DEFINE_GLOBAL_CONV
(wxMBConvStrictUTF8, wxConvUTF8, ;);
 
^
../src/common/strconv.cpp:3333:19: warning: 'gs_wxConvUTF7instance' defined but not used [-Wunused-variable]
     
static klass* gs_##name##instance = wxGet_##name##Ptr()
                   
^
../src/common/strconv.cpp:3336:5: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV2'
     WX_DEFINE_GLOBAL_CONV2
(klass, klass, name, ctor_args)
     
^
../src/common/strconv.cpp:3358:1: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV'
 WX_DEFINE_GLOBAL_CONV
(wxMBConvUTF7, wxConvUTF7, ;);
 
^
../src/common/strconv.cpp:3333:19: warning: 'gs_wxConvWhateverWorksinstance' defined but not used [-Wunused-variable]
     
static klass* gs_##name##instance = wxGet_##name##Ptr()
                   
^
../src/common/strconv.cpp:3336:5: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV2'
     WX_DEFINE_GLOBAL_CONV2
(klass, klass, name, ctor_args)
     
^
../src/common/strconv.cpp:3359:1: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV'
 WX_DEFINE_GLOBAL_CONV
(wxWhateverWorksConv, wxConvWhateverWorks, ;);
 
^
../src/common/strconv.cpp:3333:19: warning: 'gs_wxConvLocalinstance' defined but not used [-Wunused-variable]
     
static klass* gs_##name##instance = wxGet_##name##Ptr()
                   
^
../src/common/strconv.cpp:3336:5: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV2'
     WX_DEFINE_GLOBAL_CONV2
(klass, klass, name, ctor_args)
     
^
../src/common/strconv.cpp:3361:1: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV'
 WX_DEFINE_GLOBAL_CONV
(wxCSConv, wxConvLocal, (wxFONTENCODING_SYSTEM));
 
^
../src/common/strconv.cpp:3333:19: warning: 'gs_wxConvISO8859_1instance' defined but not used [-Wunused-variable]
     
static klass* gs_##name##instance = wxGet_##name##Ptr()
                   
^
../src/common/strconv.cpp:3336:5: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV2'
     WX_DEFINE_GLOBAL_CONV2
(klass, klass, name, ctor_args)
     
^
../src/common/strconv.cpp:3362:1: note: in expansion of macro 'WX_DEFINE_GLOBAL_CONV'
 WX_DEFINE_GLOBAL_CONV
(wxCSConv, wxConvISO8859_1, (wxFONTENCODING_ISO8859_1));
 
^
make
: *** [Makefile:25826: baselib_strconv.o] Error 1




What should i do?

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users