Code::Blocks Forums

User forums => Help => Topic started by: Nucleorion on January 07, 2017, 02:41:32 pm

Title: Problem compiling wxWidgets to use in codeblocks
Post by: Nucleorion on January 07, 2017, 02:41:32 pm
Hi.

I've tried configuring wxWidgets-3.1.0 to use it with codeblocks

After cleaning using the line with the clean command I try to compile with the line
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport"

But I get this error when finished.

Code
makefile.gcc:7722: recipe for target 'gcc_mswudll\monodll_app.o' failed
mingw32-make: *** [gcc_mswudll\monodll_app.o] Error 1

I have tried several times with several lines changing commands and values but I can not make wxWidgets-3.1.0 work

I have added to the path the minGW path and the version I have is 4.9.3

The last time I followed the instructions here:
Umh1467.edu.umh.es/cajon-desastre/requisitos-wxwidgets/codeblocks/
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: stahta01 on January 07, 2017, 03:09:54 pm
From http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows#wxWidgets_3.0.2 (http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows#wxWidgets_3.0.2)

I suggest trying the adding of "-std=gnu++11" to CXXFLAGS.

NOTE: If you ever built MONOLITHIC=0 in that folder you likely need to delete that folder and start over cleaning is NOT enough to switch to MONOLITHIC=1.

Edit: I removed the spaces that might NOT work; I have never used spaces (except for after the -f).
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"

Edit2: I suggest NOT using "VENDOR=cb" unless you are self building Code::Blocks.

Tim S.
 
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: Nucleorion on January 07, 2017, 06:23:28 pm
Sorry, I fix spaces added for the translator.

I try:
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"

And uninstall wxWidgets to try:
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1 USE_OPENGL=1 CXXFLAGS="-fno-keep-inline-dllexport -std=gnu++11"

but I get same error:
Code
makefile.gcc:7722: recipe for target 'gcc_mswuddll\monodll_app.o' failed
mingw32-make: *** [gcc_mswuddll\monodll_app.o] Error 1

I go to 'C:\wxWidgets-3.1.0\build\msw\gcc_mswuddll' folder, the monodll_app.o don't exist really

I have Windows 7 64bit

How are a command for log compilation in a txt file?
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: Nucleorion on January 07, 2017, 06:38:00 pm
I try also with 2.8.12 version and get this error:
Code
akefile.gcc:4723: recipe for target 'gcc_mswuddll\monodll
ingw32-make: *** [gcc_mswuddll\monodll_appbase.o] Error 1

and try with monolithics=0 after restore msw to clean installation and get:
Code
makefile.gcc:8542: recipe for target 'gcc_mswuddll\basedll_appbase.o' failed
mingw32-make: *** [gcc_mswuddll\basedll_appbase.o] Error 1
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: stahta01 on January 07, 2017, 07:46:00 pm
Might be a Compiler issue; what Compiler are you using?

Who packaged it?
Based on MinGW32 or MinGW64?

Tim S.
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: stahta01 on January 07, 2017, 07:54:34 pm
I suggest also posting your problem on https://forums.wxwidgets.org/ (https://forums.wxwidgets.org/).

Tim S.
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: Nucleorion on January 07, 2017, 11:04:27 pm
Based en MinGW32

MINGWBASEDIR=C:\MinGW
gcc version 4.9.3 (GCC)
gcc version 4.9.3 (GCC)
GNU gdb (GDB) 7.6.1
GNU ld (GNU Binutils) 2.25.1
GNU windres (GNU Binutils) 2.25.1
GNU dlltool (GNU Binutils) 2.25.1
GNU Make 3.82.90
#define __MINGW32_VERSION           3022001L
 *   __W32API_VERSION = 1,000,000 * major + 1,000 * minor + patch
#define __W32API_VERSION           3018001L


Thanks for Help. I see link of wxwidgets :)
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: stahta01 on January 07, 2017, 11:43:31 pm
I do NOT have that Compiler or W32API_VERSION; so, I have no way to help you.

Likely there is a bug in the W32API_VERSION code or in the Compiler.

It is strongly suggested that you use a Compiler that is known to build wxWidgets the first few times you try to build wxWidgets.

Tim S.
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: Nucleorion on January 08, 2017, 01:32:39 pm
Which compiler should I use in windows 7 64 bit for code::blocks? I don't know any
Title: Re: Problem compiling wxWidgets to use in codeblocks
Post by: Nucleorion on January 08, 2017, 07:25:17 pm
It seems that I have already solved it.

I have other IDES linked to the installation of MinGW and I think the problem is coming. As I do not want to ignore the other IDES I have done the following:

I downloaded the version of code blocks that includes minGW
I have installed codeblocks-16.01mingw-setup.exe and wxWidgets-3.0.2 on another computer and have compiled using these lines without problems using the minGW that comes with codeblocks:

First one line and then the other

Code
mingw32-make -f makefile.gcc BUILD=debug SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-std=gnu++11

mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=1 UNICODE=1 CXXFLAGS=-std=gnu++11

After proving that it worked on the other computer I copied the folder wxWidgets-3.0.2 compiled and I pasted it on the computer that has more IDES and gave me the errors.

And the last step with which I have managed to compile the welcome window: In the codeblocks go to Settings > Compiler > Toolchain executables > and in Compiler's installation directory I've put the path of minGW that comes with codeblocks C: \ CodeBlocks \ MinGW

Following this tutorial base
Youtube.com/watch?v=vmobZRIlBMU