error compiling wxwidgets 3.1.3 with mingw and msys

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.
User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

error compiling wxwidgets 3.1.3 with mingw and msys

Post by marco_84 » Tue Oct 29, 2019 8:29 pm

Hello at all
I see that the new version 3.1.3 of wxwidgets as released, I downloaded it from the official website wxwidgets.org, I extracted in to the c:\wxwidgets directory on O.S. windows 10, I compiled with mingw and msys, I using the ./configure and entering these parameters:

Code: Select all

./configure --prefix=/usr/local/wx-widget-win32/ --host=i586-mingw32msvc --build=i686-linux --enable-monolithic --disable-shared --enable-accessibility
make
make install

at now all ok,
since I want to make programs with accessibility, I launched the command to compile the accessibility example to see if it works, but gives me the following error:

Code: Select all

$ g++ accesstest.cpp -o accesstext.exe $(wx-config --cxxflags wx-config --libs)
g++.exe: c:/wxwidgets/lib/libwx_mswu-3.1-i586-mingw32msvc.a: No such file or directory
writes to me that this file is missing libwx_mswu-3.1-i586-mingw32msvc.a
I don't know where to search this file to make and compile the project and it work correctly


can someone help me?
bye
marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

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

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by doublemax » Tue Oct 29, 2019 11:50 pm

Did this work with your previous wxWidgets version? If yes, which version was that?
Can you build the other samples using the same command line?
Use the source, Luke!

User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by marco_84 » Wed Oct 30, 2019 6:44 pm

hello doublemax

with wxwidgets 3.0.4 everything works correctly,

I tried to compile the combo.cpp example from version 3.1.3 and it gives me the usual error.



Thanks for your help

marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

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

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by PB » Wed Oct 30, 2019 6:59 pm

Did you check wxWidgets really built successfully, i.e., there were no errors in the build log and all expected library files were produced?

I do not use MSYS/configure (I find gcc makefiles much easier to use) but your command line looks suspicious to me, e.g. parts like this

Code: Select all

--host=i586-mingw32msvc --build=i686-linux 
look like cross-compilation from Linux.

Additionally, AFAIK wxWidgets do not have official wx-config on MSW, perhaps it is not compatible with current wxWidgets? Is it even possible to mix wx-config and configure?

The official guide to using configure on MSW is here and looks quite different from what you are doing?

Are you using a version of GCC/MinGW known to work well with wxWidgets 3.1.3, such as mingw-w64 7.3 or 8.1?

And last but not least, make sure you cleaned everything from previous wxWidgets version so you are not mixing files from the old and new one.

User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by marco_84 » Wed Oct 30, 2019 10:49 pm

hello PB

I cleaned the disk from mingw and wxwidgets, and I put all repeating the procedure with ./configure and I was careful that everything worked properly but after doing make gives me the following errors:

Code: Select all

./include/wx/types.h:255:42: warning: "__MINGW_FEATURES__" is not defined
./src/msw/evtloop.cpp: In member function `virtual void wxGUIEventLoop::DoYieldFor(long int)':
./src/msw/evtloop.cpp:326: error: `WM_UNICHAR' was not declared in this scope
./src/msw/evtloop.cpp:326: warning: unused variable 'WM_UNICHAR'
make: *** [monolib_msw_evtloop.o] Error 1
bye
marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Wed Oct 30, 2019 11:42 pm

I just want to confirm you mean this msys http://www.mingw.org/wiki/MSYS

If you mean MSYS2 from https://www.msys2.org/
I might be able to help.

Tim S.

User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by marco_84 » Thu Oct 31, 2019 8:07 am

hello stahta01

msys version 1.0.11

marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Fri Nov 01, 2019 1:52 am

Are you still using this configure option "--prefix=/usr/local/wx-widget-win32/ " ?

From http://www.mingw.org/wiki/MSYS
Installing to "/usr/local" should be avoided, since the MinGW compiler won't look there by default.
Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Fri Nov 01, 2019 2:30 am

I am going to try to duplicate your problem; but, I am seeing if a more normal way works, first.

Code: Select all

$ uname -a
MINGW32_NT-6.1 LAPTOP2-TIM 1.0.19(0.48/3/2) 2016-07-13 17:45 i686 Msys

Code: Select all

$ gcc --version
gcc.exe (MinGW.org GCC-8.2.0-5) 8.2.0
Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Fri Nov 01, 2019 4:26 am

marco_84 wrote:
Wed Oct 30, 2019 10:49 pm
hello PB

I cleaned the disk from mingw and wxwidgets, and I put all repeating the procedure with ./configure and I was careful that everything worked properly but after doing make gives me the following errors:

Code: Select all

./include/wx/types.h:255:42: warning: "__MINGW_FEATURES__" is not defined
./src/msw/evtloop.cpp: In member function `virtual void wxGUIEventLoop::DoYieldFor(long int)':
./src/msw/evtloop.cpp:326: error: `WM_UNICHAR' was not declared in this scope
./src/msw/evtloop.cpp:326: warning: unused variable 'WM_UNICHAR'
make: *** [monolib_msw_evtloop.o] Error 1
bye
marco_84
That error looks to be a bad compiler; what does "g++ --version" return?

Tim S.

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Fri Nov 01, 2019 5:12 am

Could not duplicate problem using git master branch.

Using steps below.

Tim S.

Code: Select all

mkdir -p /mingw/local
./configure --prefix=/mingw/local/wx-widget-win32/ \
    --enable-monolithic --disable-shared --enable-accessibility

make
make install

export PATH=/mingw/local/wx-widget-win32/bin:$PATH

cd samples/access

g++ accesstest.cpp -o accesstext.exe $(wx-config --cxxflags --libs)

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Fri Nov 01, 2019 6:39 am

No problem when using wxWidgets-3.1.3

Code: Select all

cd C:/wxWidgets-3.1.3

mkdir -p /mingw/local
./configure --prefix=/mingw/local/wx-widget-win32/ \
    --enable-monolithic --disable-shared --enable-accessibility

make && make install

export PATH=/mingw/local/wx-widget-win32/bin:$PATH

cd samples/access && rm -f accesstext.exe && \
g++ accesstest.cpp -o accesstext.exe $(wx-config --cxxflags --libs) && \
accesstext.exe

User avatar
marco_84
Experienced Solver
Experienced Solver
Posts: 68
Joined: Mon Jul 08, 2019 7:30 pm
Location: Italy, Tuscany

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by marco_84 » Fri Nov 01, 2019 7:02 pm

Hello

Thanks sthata01 for your help
probably as posted you, the version of gcc 3.4.5 which I use for support of the accessibility that is no longer compatible with version 3.1.3 of wxwidgets, I need accessibility because I am blind, and gcc 3.4.5 is the only version that I managed to download from the internet, and that is supported by wxwidgets,
if possible can you let me have a compatible version of gcc with support for accessibility and compatible with this new version?

I need it because I have to implement the accessibility of the treelist
I was discussing in this section:
accessibility for a blinds users on my project

Initially I had version 3.0.4 of wxwidgets to practice with accessibility but with the treelist I couldn't implement it, I was the last chance to update the wxwidgets version, I found version 3.1.3
but I can't compile the installation of the version of wxwidgets 3.1.3 without errors

I haven't idea how to solve it

Thanks in advance to everyone

marco_84
I'm using: Ubuntu and Windows platform with wxwidgets 3.1.3

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 365
Joined: Fri Nov 03, 2006 2:00 pm

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by stahta01 » Fri Nov 01, 2019 11:23 pm

I have no suggestion on how you can proceed. No idea what compiler is best for wxAccessible.

I use mainly mingw64 based GCC; I have no idea if they even work with wxAccessible.

Tim S.

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

Re: error compiling wxwidgets 3.1.3 with mingw and msys

Post by doublemax » Fri Nov 01, 2019 11:28 pm

Is there a reason why you must use MSYS? I think it's the least common way to build wxWidgets.
Use the source, Luke!

Post Reply