News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Problem compiling wxWidgets to use in codeblocks

Started by Nucleorion, January 07, 2017, 02:41:32 PM

Previous topic - Next topic

Nucleorion

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

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.

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/

stahta01

#1
From 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).

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Nucleorion

#2
Sorry, I fix spaces added for the translator.

I try:
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:
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:

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?

Nucleorion

I try also with 2.8.12 version and get this error:
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:

makefile.gcc:8542: recipe for target 'gcc_mswuddll\basedll_appbase.o' failed
mingw32-make: *** [gcc_mswuddll\basedll_appbase.o] Error 1

stahta01

Might be a Compiler issue; what Compiler are you using?

Who packaged it?
Based on MinGW32 or MinGW64?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Nucleorion

#6
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 :)

stahta01

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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Nucleorion

Which compiler should I use in windows 7 64 bit for code::blocks? I don't know any

Nucleorion

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

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