Error while compiling wxWidgets
Error while compiling wxWidgets
Hi
I downloaded the wxWidgets source, unzipped it and followed the instructions to compile it, using the following bat file:
ECHO ON
G:
CD %WXWIN%\build\msw
%MINGW%mingw32-make -f makefile.gcc
PAUSE
Note:
1) The wxWidgets source is installed on my G: volume.
2) %WXWIN% environment variable is correctly defined.
3) %MINGW% environment variable points to C:\mingw\bin (the mingw installation directory).
4) Mingw was installed successfully.
5) I am using a 64-bit Windows 10 PC.
After executing the first command successfully, I get the following error and the compilation aborts:
gcc: error: CreateProcess: No such file or directory
makefile.gcc:5702: recipe for target 'gcc_mswud\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswud\wxregex_regcomp.o] Error 1
I then searched on this forum for error 5702, and based on some suggestions here on an earlier similar problem, I modified the make command as follows in the bat file:
%MINGW%mingw32-make -f makefile.gcc CPPFLAGS="-m32" LDFLAGS="-m32" WINDRES="windres --use-temp-file -F pe-i386" BUILD=release
This resulted in MinGW error 5657. But if I run the bat file again, error 5702 returns. In both cases, compilation aborts.
Please advise.
Thanks
Steven
I downloaded the wxWidgets source, unzipped it and followed the instructions to compile it, using the following bat file:
ECHO ON
G:
CD %WXWIN%\build\msw
%MINGW%mingw32-make -f makefile.gcc
PAUSE
Note:
1) The wxWidgets source is installed on my G: volume.
2) %WXWIN% environment variable is correctly defined.
3) %MINGW% environment variable points to C:\mingw\bin (the mingw installation directory).
4) Mingw was installed successfully.
5) I am using a 64-bit Windows 10 PC.
After executing the first command successfully, I get the following error and the compilation aborts:
gcc: error: CreateProcess: No such file or directory
makefile.gcc:5702: recipe for target 'gcc_mswud\wxregex_regcomp.o' failed
mingw32-make: *** [gcc_mswud\wxregex_regcomp.o] Error 1
I then searched on this forum for error 5702, and based on some suggestions here on an earlier similar problem, I modified the make command as follows in the bat file:
%MINGW%mingw32-make -f makefile.gcc CPPFLAGS="-m32" LDFLAGS="-m32" WINDRES="windres --use-temp-file -F pe-i386" BUILD=release
This resulted in MinGW error 5657. But if I run the bat file again, error 5702 returns. In both cases, compilation aborts.
Please advise.
Thanks
Steven
Re: Error while compiling wxWidgets
Add the bin folder of your MinGW installation (e.g. C:\MinGW\bin) to your Windows environment PATH variable
Use the source, Luke!
Re: Error while compiling wxWidgets
Follow the steps here
http://yasriady.blogspot.co.id/2015/08/ ... mingw.html
and do not forget your mingw's bin folder already in your path.
http://yasriady.blogspot.co.id/2015/08/ ... mingw.html
and do not forget your mingw's bin folder already in your path.
wxWidgets Journal at http://yasriady.blogspot.com
Re: Error while compiling wxWidgets
Yes, adding c:\mingw\bin\ to the PATH variable definition has definitely helped. Thanks for this advice. Compilation proceeds and some output files are generated in the following subdirectories of the wxwidgets unzip folder:
1. build\msw\mswud: Contains several files with .d and .o suffixes.
2. lib\gcc_lib: contains several files with .a suffixes
I'm not sure if any other file types are supposed to be generated. I don't see any DLL files,
though.
The first time I ran the compilation bat file, I had added the DOS command ECHO ON and many messages were generated on the screen. Also, the files mentioned above were generated.
I then removed the ECHO ON command from the bat file and ran it again. This time of course no messages were displayed. Also, no error messages were displayed. The compilation seems to have succeeded. Is there any way I can confirm if this is the case? Is there any need for such a confirmation?
The reason I ask, is that when trying to create a wxwidgets project using the Code::Blocks IDE, the project gets created all right (but with quite a few warning messages from the wizard), but doesn't build later. C::B asks for certain global compiler variables (wx) to be defined and I'm not yet sure to which directories these should point. This may be the cause.
Also, I'm unable to locate the wxwidgets manual on my system. There is no large PDF/CHM/RTF/HTB file anywhere in the wxwidgets unzip folder or its subfolders. Where is this manual supposed to be and what is its name?
Thanks
Steven
1. build\msw\mswud: Contains several files with .d and .o suffixes.
2. lib\gcc_lib: contains several files with .a suffixes
I'm not sure if any other file types are supposed to be generated. I don't see any DLL files,
though.
The first time I ran the compilation bat file, I had added the DOS command ECHO ON and many messages were generated on the screen. Also, the files mentioned above were generated.
I then removed the ECHO ON command from the bat file and ran it again. This time of course no messages were displayed. Also, no error messages were displayed. The compilation seems to have succeeded. Is there any way I can confirm if this is the case? Is there any need for such a confirmation?
The reason I ask, is that when trying to create a wxwidgets project using the Code::Blocks IDE, the project gets created all right (but with quite a few warning messages from the wizard), but doesn't build later. C::B asks for certain global compiler variables (wx) to be defined and I'm not yet sure to which directories these should point. This may be the cause.
Also, I'm unable to locate the wxwidgets manual on my system. There is no large PDF/CHM/RTF/HTB file anywhere in the wxwidgets unzip folder or its subfolders. Where is this manual supposed to be and what is its name?
Thanks
Steven
- xaviou
- Super wx Problem Solver
- Posts: 437
- Joined: Mon Aug 21, 2006 3:18 pm
- Location: Annecy - France
- Contact:
Re: Error while compiling wxWidgets
Hi
If the build process went ok till its end, you should have a file named "build.cfg" in your "lib\gcc_lib\mswu[d]" folder.
As it is the last thing created by the build process, if you have it, all is ok.
You should better download this manual from sourceforge : Regards
Xav'
These are temporary build files : once your build is finished, you don't need this folder anymoreSSteven wrote:1. build\msw\mswud: Contains several files with .d and .o suffixes.
These are the result of your build.SSteven wrote:2. lib\gcc_lib: contains several files with .a suffixes
The built files are in a "gcc_lib" folder so you've asked for a static build witch doesn't produce any dll files (all the needed parts of the framework will be inserted in the executable).SSteven wrote:I'm not sure if any other file types are supposed to be generated. I don't see any DLL files, though.
If the build process went ok till its end, you should have a file named "build.cfg" in your "lib\gcc_lib\mswu[d]" folder.
As it is the last thing created by the build process, if you have it, all is ok.
Be sure that the settings of the project reflect the settings of your build (for example, "use wxWidgets Dll" and "wxWidgets is build as a monolithic library" shouldn't be checked).SSteven wrote:The reason I ask, is that when trying to create a wxwidgets project using the Code::Blocks IDE, the project gets created all right (but with quite a few warning messages from the wizard), but doesn't build later. C::B asks for certain global compiler variables (wx) to be defined and I'm not yet sure to which directories these should point. This may be the cause.
The standard build commands doesn't create the manual.SSteven wrote:Also, I'm unable to locate the wxwidgets manual on my system. There is no large PDF/CHM/RTF/HTB file anywhere in the wxwidgets unzip folder or its subfolders. Where is this manual supposed to be and what is its name?
You should better download this manual from sourceforge : Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
Re: Error while compiling wxWidgets
Yes, the build.cfg file is present in the "lib\gcc_lib\mswud" folder. Thus, the compilation is OK.
Thanks
Steven
Thanks
Steven
Re: Error while compiling wxWidgets
Thank, this works fine!
adding USE_GUI=1 to the make command did not do the trick.
Any suggestions?
but how to include wxGraphicsContext?yasriady wrote:Follow the steps here
http://yasriady.blogspot.co.id/2015/08/ ... mingw.html
and do not forget your mingw's bin folder already in your path.
adding USE_GUI=1 to the make command did not do the trick.
Any suggestions?
- xaviou
- Super wx Problem Solver
- Posts: 437
- Joined: Mon Aug 21, 2006 3:18 pm
- Location: Annecy - France
- Contact:
Re: Error while compiling wxWidgets
Hi
To enable it you just have to edit the "setup.h" file (in the include/wx/msw subfolder of the wxWidgets sources).
If the file is not present, make a copy of the one named "setup0.h" and name it "setup.h"
In this file, search for wxGraphicsContext.
You should find a section like the following (this is the wx-3.0.2 version of the setup.h file):
Replace the last # define wxUSE_GRAPHICS_CONTEXT 0 by # define wxUSE_GRAPHICS_CONTEXT 1
Save and re-launch the build process and wxGraphicsContext should be enabled.
Regards
Xav'
wxGraphicsContext is disabled by default for other compilers than Visual C++.rocrail wrote: but how to include wxGraphicsContext?
adding USE_GUI=1 to the make command did not do the trick.
Any suggestions?
To enable it you just have to edit the "setup.h" file (in the include/wx/msw subfolder of the wxWidgets sources).
If the file is not present, make a copy of the one named "setup0.h" and name it "setup.h"
In this file, search for wxGraphicsContext.
You should find a section like the following (this is the wx-3.0.2 version of the setup.h file):
Code: Select all
// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is
// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined
#ifdef _MSC_VER
# if _MSC_VER >= 1310
// MSVC7.1+ comes with new enough Platform SDK, enable
// wxGraphicsContext support for it
# define wxUSE_GRAPHICS_CONTEXT 1
# else
// MSVC 6 didn't include GDI+ headers so disable by default, enable it
// here if you use MSVC 6 with a newer SDK
# define wxUSE_GRAPHICS_CONTEXT 0
# endif
#else
// Disable support for other Windows compilers, enable it if your compiler
// comes with new enough SDK or you installed the headers manually.
//
// Notice that this will be set by configure under non-Windows platforms
// anyhow so the value there is not important.
# define wxUSE_GRAPHICS_CONTEXT 0
#endif
Save and re-launch the build process and wxGraphicsContext should be enabled.
Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
Re: Error while compiling wxWidgets
Thanks!
I will try it and report.
I will try it and report.
Re: Error while compiling wxWidgets
Thanks again.
This worked.
But I also had to change it in
after the build.
This worked.
But I also had to change it in
Code: Select all
lib\gcc_lib\mswu\wx\setup.h
- xaviou
- Super wx Problem Solver
- Posts: 437
- Joined: Mon Aug 21, 2006 3:18 pm
- Location: Annecy - France
- Contact:
Re: Error while compiling wxWidgets
Because you didn't made a clean build : this file is copied the first time you launch the build.rocrail wrote:Thanks again.
This worked.
But I also had to change it inafter the build.Code: Select all
lib\gcc_lib\mswu\wx\setup.h
But in a "normal" way, I think you should have edited it before the build.
Regards
Xav'
My wxWidgets stuff web page : X@v's wxStuff
Re: Error while compiling wxWidgets
Hi,
this method will also work for 64 bit? (tdm64-gcc-5.1.0-2.exe)
Or should the CXXFLAGS set another value?
Code: Select all
mingw32-make -f makefile.gcc BUILD=release UNICODE=1 SHARED=0 CXXFLAGS="-std=gnu++11"
Or should the CXXFLAGS set another value?
Re: Error while compiling wxWidgets
OK, it works also for 64 bit.