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

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

Related

Building Intel Threading Building Blocks fails with Mingw-w64

I am using Mingw-w64 with gcc 10.2 and I am trying to compile Intel Threading Building Blocks on a MSYS2 console. I have been successfully using the build scripts of the older versions before, but the new version with tag "v2021.2.0" offers CMake build only.
I build by running this script on the MSYS2 console:
#!/bin/bash
TBB_DIR=/c/Libraries/TBB
PARALLEL_PROCESSES=1
echo
echo Building Tbb...
echo
rm -rf $TBB_DIR/Build
mkdir $TBB_DIR/Build
cd $TBB_DIR/Build
cmake -DCMAKE_BUILD_TYPE="Release" -S "$TBB_DIR" -B "$TBB_DIR/Build" -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="$TBB_DIR/Install" -DTBB_STRICT=False -DTBB_TEST=False
cd $TBB_DIR/Build
mingw32-make -j $PARALLEL_PROCESSES install
The builds fails and the error is:
In file included from C:/Libraries/TBB/include/oneapi/tbb/detail/_utils.h:26,
from C:/Libraries/TBB/src/tbb/allocator.cpp:21:
C:/Libraries/TBB/include/oneapi/tbb/detail/_machine.h:241:56: error: '_MCW_DN' was not declared in this scope
241 | static constexpr unsigned int X87CW_CONTROL_MASK = _MCW_DN | _MCW_EM | _MCW_RC;
| ^~~~~~~
compilation terminated due to -Wfatal-errors.
Why is this the case? Is Mingw-w64 not supported? Or what am I doing wrong?
I'm able to build TBB 2020.0 with MinGW-w64 on Windows like this (without CMake):
#ARCH=ia32
ARCH=intel64
mingw32-make compiler=gcc arch=$ARCH runtime=mingw tbb tbbmalloc CPLUS="g++ -static-libstdc++ -static-libgcc"

( __ printf __ ) cannot be found in DLL (programfiles(x86)\codeblocks\mingw\bin\as.exe)

I'm trying to learn wxwidgets for cross platform GUI development, however I faced a problem.
When try to build wxwidgets with mingW32 I run into errors. I installed minGW32 with codeblocks 16.1 (works fine), added PATH to System Environment. Downloaded all possibilities from wxwidgets.org. None of them wants to compile when I try to compile wxwidgets library from cmd with mingw32. I go into wxwidgets/build/msw, typed several versions but to mention one:
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITIC=1 UNICODE=1
(tried without shared, monolitic, even debug mode)
About the error:
( __ printf __ ) cannot be found in DLL
(programfiles(x86)\codeblocks\mingw\bin\as.exe)
I have the exe, tried to reinstall everything from scratch several times. I'm using Windows 10.
gcc -c -o gcc_mswudll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__ -D_UNICODE -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
makefile.gcc:5778: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1
Update:
After reinstalling and deleting everything connected to this, the problem has changed. The code I use, tried without the flag, and with flag but only"-std=gnu++11" too:
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"
The new error code:
gcc -c -o gcc_mswudll\wxregex_regcomp.o -O2 -mthreads -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswu -D__WXMSW__ -D_UNICODE -MTgcc_mswudll\wxregex_regcomp.o -MFgcc_mswudll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
gcc: error: CreateProcess: No such file or directory
makefile.gcc:5702: recipe for target 'gcc_mswudll\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswudll\wxregex_regcomp.o] Error 1
Any infos about the fact that I could not ever compile wxwidget with codeblocks' built in compiler? without addons?
Delete everything: wxWidgets, Code::Blocks and MinGW or TDM-GCC
* Download and install C::B, without MinGW or TDM
* Download TDM-GCC from here. If you install both 32 & 64 bits versions I suggest you to install them in two different folders.
* Download wxWidgets
Open a command window. Say you have TDM at "C:\TDM32" and wxWidgets at "C:\myWX".
Use these commands to compile wxWidgets:
PATH=%PATH%;C:\TDM32\bin
cd C:\myWX\build\msw
mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITIC=1 UNICODE=1
This should build an only .dll file with most of wxWidgets. Not OpenGL.
If you prefer several .dll don't use "Monolitic=1"
If you prefer not using wx'dlls, but static '.a' files added to your app, don't use "shared=1"
If you want to step into wxWidgets code when using a debugger, use "BUILD=debug"
If you want OpenGL use "USE_OPENGL=1"
To build wxWidgets with C++11 use CXXFLAGS="-std=gnu++11"
For your own app you must tell C::B:
* where the TDM compiler can be found
* where the wxWidgets headers can be found
* where the wxWidgets libraries (.dll or .a depending if you compiled with "shared") can be found

Compiling a static version of wxWidgets

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.

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.