Compiling a static version of wxWidgets - c++

I tried a lot now but nothing is working..
I saw a lot of posts about this and a lot of answeres, but none of it is working for me...
Did anybody successfully build wxWidgets as static and now the right commands?
I downloaded wxWidgets here: http://www.wxwidgets.org/downloads/
I tried for example the following commands:
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release clean
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release
or this:
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release clean
mingw32-make -f makefile.gcc -j4 SHARED=0 MONOLITHIC=1 BUILD=release
But when the build is finished and I tried to compile a simple programm in Code::Blocks I get a lot of 'undefined reference' errors.
Has anybody experience with it and successfully build a static copie of wxWdigets?
And if so, could you please tell me the commands you used...
I have a dynamic build which I already build and this is working... but I need a static version so I can get a working standalone exe....

If you want to see how to build wxWidgets, good..but no with mingw, it takes ages...you can try binaries for both compilers, see wx's sourceforge site.

Related

Is there a possibility that 'clean' method doesn't see a makefile.gcc?

I'm trying to build a wxWidgets 3.0.4 and I'm following these instructions:
gcc -v
mingw32-make -v
cd /D C:\wxWidgets-3.0.4\build\msw
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=1 UNICODE=1
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1
But when I'm trying to use step number 4 with clean I've got an error :
make (e=2) the system cannot find the file specified.
The makefile.gcc is in the directory in which I'm using this command but the command cannot see this file.
What can I do in this situation?
EDIT:
These are the prinoutf from cmd after step 4:
https://pastebin.com/S4LaBXk6

Unable make wxWidgets-3.0.4 on codeblocks

I am facing a problem when I try to install the wxWidgets-3.0.4 and used it with Code::Blocks. I have searched a lot on the internet for something similar, without success.
I had installed the wxWidgets in the directory C:\wxWidgets-3.0.4
I used the instructions from the site here but when I type
mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
I get
C:\wxWidgets-3.0.4\build\msw>mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw
process_begin: CreateProcess(NULL, -c "if not exist ..\..\lib\gcc_dll\msw mkdir ..\..\lib\gcc_dll\msw", ...) failed.
make (e=2): The system cannot find the file specified.
makefile.gcc:5642: recipe for target '..\..\lib\gcc_dll\msw' failed
mingw32-make.exe: *** [..\..\lib\gcc_dll\msw] Error 2
So, I cannot figure out the problem. Why I cannot continue.
I suspect you have some Cygwin/MSYS utilities in your PATH and they don't work with these makefiles which are explicitly intended for being used from DOS-like environments.
If you want to use Cygwin, you should build wxWidgets using configure. Otherwise, type path to see the current value and remove anything containing mkdir.exe from it.

how compile wxwidget 3.1 with tdm gcc 5.1 ? version 64bit on i5 windows 7 64biti and use on codebloks 16?

I was using this for compiling
mingw32-make -j4 -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release CXXFLAGS="-fno-keep-inline-dllexport -std=c++11" MONOLITHIC=1
or
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release MONOLITHIC=1
with wxwidget 3.1 /3.0 /3.0.1 /3.0.2 mising lib lwxmsw3xx or I get error on compiling process with tdm gcc 4.8 to 5.1 , mingw gcc 4.9.3 to mingw-w64 gcc 6 dragon.
I succeeded compiling and use wxwidget 2.8.12 but when I start coding surprise not support c++11 . on 3.1 missing lib or dll or I get error gcc 4.8 to 6
problem solved rename file -lwxmsw31u to -lwxmsw30u and every thing work like charm , the problem was i think from codeblocks it's not suport 3.1.0

cannot find -lwxmsw30u_core and -lwxbase30u in codeblocks

I am getting error like this. I have searched my wxwidgets folder\lib\gcc_dll this particular libraries are not build. Am i missing something here?
I have used this command to build wxwidgets:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
You have used MONOLITHIC=1 for some reason. If this was intentional, you need to link with the single library produced in this case and not the separate core and base libraries. If it wasn't, then you should remove the build directories (build\msw\gcc_mswu and lib\gcc_dll) and rebuild without using it.

wxWidget 2.8.12 not working in Codeblocks

I'm learning to use wxWidget 2.8.12 with Codeblocks 12.11. I have followed the instructions on this site to install wxWidgets and Codeblocks:
http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef
When I try to create the project and run the demo app I get the error:
fatal error: wx/setup.h: No such file or directory
The following picture will show this better:
I have followed the instructions, but still I get the error...what seems to be the problem? :(
Thnx for any help
P.S.
Here is an overview what I have done:
1) I downloaded Codeblocks including MinGW (codeblocks-12.11mingw-setup.exe)
http://www.codeblocks.org/downloads/26#windows and I have installed them using the .exe file
2) I have edited my User PATH environment variable to according to the reference page I have used
3) I have downloaded wxWidgets installer from this link and installed it:
http://sourceforge.net/projects/wxwindows/files/2.8.12/wxMSW-2.8.12-Setup.exe/download?use_mirror=garr
4) I have entered the directory C:\<wxWidgets root>\build\msw and inputted the following command in command prompt:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-fno-keep-inline-dllexport
After letting wxWidgets build and trying to run my demo app I get the error I mentioned in Codeblocks :(
NOTICE FUTURE READERS: Install wxWidgets to a directory without whitespace in the path name! Otherwise this will cause trouble
Please have a look at the Below Link which i have put.It will be very useful.I have also installed wxWidget 2.8.12 with Codeblocks 12.11 using This Link.
Setting up wxWidgets(2.9.4) with Code::Blocks(12.11) in Windows
Type These below steps in Command Prompt after you finish installing the wxWidgets2.8.12 and CODEBLOCKS 12.11.
gcc -v
mingw32-make -v
cd /D C:\wxWidgets-2.8.12\build\msw
mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=1 UNICODE=1
mingw32-make -f makefile.gcc BUILD=release SHARED=0 MONOLITHIC=1 UNICODE=1
If the problem still persists after doing all the above steps then You're missing an important compiler search path in your build options.
Make sure you choose the correct wxWidgets build configuration when running the wxWidgets project wizard.
If re-running the wizard isn't an option, then open your project's build options and add "$(#wx.lib)\gcc_dll\mswu" (assuming a monolithic Unicode DLL build) to the compiler search paths.