Building wxWidgets for Windows

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
ziaccot
In need of some credit
In need of some credit
Posts: 4
Joined: Sun Aug 02, 2015 8:57 am

Building wxWidgets for Windows

Post by ziaccot »

I tried to build wx from source by this manual http://codelite.org/Developers/BuildingWxWidgetsWin
But I get an error about missing dll`s. Please help (give some instructions) me to build wx for windows using gcc 5.1.0
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Building wxWidgets for Windows

Post by PB »

The official instructions for building wxWidgets for MSW are given in WXWIN/docs/msw/install.txt.

By the way, when reporting an issue, you're supposed to copy&paste the error message(s) you get. Providing your wxWidgets verion is also helpful.

Edit:
You should do fine with the instructions provided on the CodeLite page, building wxWidgets is no rocket science. There's a lingering issue though, sometimes the paths of the object files for some yet unknown reason lose a letter in them which prevents the build to successfully finish. You can find few threads reporting the issue here, but the error message is not about "missing DLLs".
ziaccot
In need of some credit
In need of some credit
Posts: 4
Joined: Sun Aug 02, 2015 8:57 am

Re: Building wxWidgets for Windows

Post by ziaccot »

Image
User avatar
tierra
Site Admin
Site Admin
Posts: 1355
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Re: Building wxWidgets for Windows

Post by tierra »

Do you actually have Cygwin or MinGW installed? That looks like a standard command prompt, which these instructions don't apply to, and where you likely don't even have gcc in your PATH. Second, you didn't even follow the instructions correctly: It asked you to create "build-debug" directory, and run "../configure" from that directory. At the least, you need to run "./configure" (and not "configure"), but that's still not going to work in a standard command prompt.
ziaccot
In need of some credit
In need of some credit
Posts: 4
Joined: Sun Aug 02, 2015 8:57 am

Re: Building wxWidgets for Windows

Post by ziaccot »

I downloaded from http://tdm-gcc.tdragon.net/download TDM64 MinGW-w64 edition. Installer added "C:\TDM-GCC-64\bin" into PATH.
Standart or MinGW command promt returns the same thing. Even from "build-debug" directory.
Image
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Building wxWidgets for Windows

Post by PB »

The configure command is not a part of GCC. AFAIK it comes with CygWin/MSYS.

Is there a reason why you are so intent on using configure? It is not the standard way of compiling wxWidgets on Windows, the standard way is to alter (if needed) setup.h and compile with provided makefiles using a Windows command line...
ziaccot
In need of some credit
In need of some credit
Posts: 4
Joined: Sun Aug 02, 2015 8:57 am

Re: Building wxWidgets for Windows

Post by ziaccot »

When I type "mingw32-make -f makefile.gcc" , I`ve got this error
Image
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Building wxWidgets for Windows

Post by PB »

Well, apparently gcc 5.1 defaults to compiling in C++11 mode (I am using TDM GCC 4.8.1 which does not). Therefore you have to reflect that when compiling wxWidgets, i.e. as advised in the docs, you need to use CXXFLAGS="-std=gnu++11" for the build.

I.e.

Code: Select all

mingw32-make -f makefile.gcc SHARED=1 BUILD=release CXXFLAGS="-std=gnu++11" clear
mingw32-make -f makefile.gcc SHARED=1 BUILD=release CXXFLAGS="-std=gnu++11"
User avatar
yasriady
Knows some wx things
Knows some wx things
Posts: 32
Joined: Mon Apr 28, 2014 5:17 am

Re: Building wxWidgets for Windows

Post by yasriady »

Hi there,

I made simple tutorial to build wxWidgets on windows. Please check it here http://yasriady.blogspot.com/2015/08/ho ... ndows.html
wxWidgets Journal at http://yasriady.blogspot.com
Post Reply