User forums > Help
wxWidgets 2.6 (MSW, GCC) installation instructions
rickg22:
IMPORTANT: This first post is now obsolete. Check the latest post for the instructions.
OK. Here's how to build wxWidgets 2.6 + stc under Microsoft Windows™ to use with MINGW32.
(NOTE: Altho Code::Blocks still can't be compiled with this version of wxWidgets, I'm posting this in advance for when it's ready. The wx2.4.2 installation instructions are very similar. They're hidden er located elsewhere in this forum)
1) Download the package from wxwidgets.org and install. I downloaded the zip version and unzipped on a directory.
2) Make sure Your mingw gcc dir ( that's the mingw/bin directory) is in your system path (Right-click My Computer,properties, advanced options,
environment variables).
Note: This version of wxWidgets is designed to work with NATIVE win32 commands. Older versions (like 2.4.2) need the MSYS package to compile.
3) Open a Command window and change to the wxwidgets directory.
Suppose you installed in C:\wxWidgets-2.6.0:
Type:
--- Code: ---cd {your-wxwidgets-dir}\build\msw
--- End code ---
4)
--- Code: ---make -f makefile.gcc SHARED=1 BUILD=release UNICODE=0
--- End code ---
Go to dinner, watch TV and play some games while the compilation is done. [ Note: if you can't find a program called "make", try "mingw32-make" ]
5)
--- Code: ---cd {your-wxwidgets-dir}\contrib\build\stc
make -f makefile.gcc WXUSINGDLL=1 BUILD=release SHARED=1 UNICODE=0
--- End code ---
6)
--- Code: ---explorer {your-wxwidgets-dir}\lib\gcc_lib
--- End code ---
Copy everything there (subdirectories included) to your MINGW directory
7) Change directory to {your-wxwidgets-dir}\include
Copy everything there (including subdirectories) to your mingw "include" dir. NOTE: If you're still using wxwidgets 2.4.2, I suggest renaming your old "wx" dir to "wx242" so you can restore later.
8) Ta-da! You're ready to compile!
Anonymous:
I tryed the above but add c:\Dev-cpp\bin(on my computer but should point to mingw gcc dir) to my path since i think you forgot it in the instructions. Make could not be found other wise. Compiled everything fine except no dll where created.
Is this something i goof up on?
I think it probbly becuase WXMAKINGDLL=1 might not be supported anymore but that just a guse. I ran out of time but want to try it with shared=1 like they say in documontaion. Has any had any luck following these instruction?
David Perfors:
Yes I did succesfully compile.. but I wanted to have a single dll :)
rickg22:
Thanks for the complains about the instructions. I added the modifications. Now if you want to have a single DLL, i think you have to add the MONOLITHIC=1 in the make command. (Note: Haven't tested, it tho. Read the "readme" files regarding this option)
rahxephon:
First thank you. This really worked for me, i have tried to compile a simple wxWidget app since some days without success.
The file setup.h in lib\gcc_dll\msw\wx I copied to include\wx. I saw somewhere that it should be done, I don't remember where and don't know if it really matters.
--- Quote ---Copy everything there (subdirectories included) to your MINGW directory
--- End quote ---
This is what you said in step 6. But in the subdirectories only the setup.h file is there. Well i did only copy the .a and .dll files to the mingw\lib directory. I don't know if this is what you meant. You only said MINGW directory which was a bit confusing.
By the way are the .a files really necessary since we already have the .dll files?
After making a new wxWidgets projekt in Codeblocks i had to make some changes. Under Linker Options/Link libraries i deleted the existing entry. Then i added C:\MinGW\lib\wxbase26_gcc_custom.dll and C:\MinGW\lib\wxmsw26_core_gcc_custom.dll. The order here didn't matter for me. I tried both.
I also tried only wxbase26_gcc_custom.dll and wxmsw26_core_gcc_custom.dll as an entry. I added my mingw\lib directory to both the compiler and linker. This didn't work. Can someone explain why?
After successful compiling and starting the app I got an error message that the dll was not found. I simply copied the two dlls in my project directory. It did also work to copy the dlls in some directory where the directory was included into the Environment Variable PATH.
When i looked up how to compile wxWidgets 2.6 only the 4step was described in their documentation. What does the makefile under contrib\build\stc do?
Again thank you very much. I can finally start programming with wxWidgets.
Navigation
[0] Message Index
[#] Next page
Go to full version