Author Topic: Problem compiling wxWidgets to use in codeblocks  (Read 4049 times)

Offline Nucleorion

  • Single posting newcomer
  • *
  • Posts: 8
Problem compiling wxWidgets to use in codeblocks
« 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/
« Last Edit: January 07, 2017, 05:57:08 pm by Nucleorion »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #1 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

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.
 
« Last Edit: January 07, 2017, 03:20:38 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Nucleorion

  • Single posting newcomer
  • *
  • Posts: 8
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #2 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?
« Last Edit: January 07, 2017, 06:29:18 pm by Nucleorion »

Offline Nucleorion

  • Single posting newcomer
  • *
  • Posts: 8
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #3 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

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #4 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #5 on: January 07, 2017, 07:54:34 pm »
I suggest also posting your problem on https://forums.wxwidgets.org/.

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

Offline Nucleorion

  • Single posting newcomer
  • *
  • Posts: 8
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #6 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 :)
« Last Edit: January 07, 2017, 11:06:43 pm by Nucleorion »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #7 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Nucleorion

  • Single posting newcomer
  • *
  • Posts: 8
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #8 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

Offline Nucleorion

  • Single posting newcomer
  • *
  • Posts: 8
Re: Problem compiling wxWidgets to use in codeblocks
« Reply #9 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