Author Topic: Code::Block and wxWidges 3.0.0  (Read 11409 times)

Offline art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
Code::Block and wxWidges 3.0.0
« on: November 12, 2013, 06:16:48 pm »
I have built wxWidges with this command; There were no errors.

mingw32-make.exe -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release

When I try to create a wx project, i get this error:

A matching Release configuration cannot be found in the wxWidgets directory you specified. This means that Release target of your project will not build.


Mingw is 4.8.1 and built is for 64bit comp.
The files are there though.

C:\wxMSW-3.0.0\lib\gcc_lib\mswu exists ...

I have selected 2.9, as there is no option for 3.0.0. May that have confused the project wizard ?


« Last Edit: November 12, 2013, 09:10:51 pm by art1221 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Code::Block and wxWidges 3.0.0
« Reply #2 on: November 12, 2013, 11:48:32 pm »
oBFusCATed, thanks for the link. I am now using the updated wizard and it does allow to select wxWidgets 3.0.x, but still I have the same problem....

A matching Release configuration cannot be found in the wxWidgets directory you specified. This means that Release target of your project will not build.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Code::Block and wxWidges 3.0.0
« Reply #3 on: November 12, 2013, 11:50:28 pm »

oBFusCATed, thanks for the link. I am now using the updated wizard and it does allow to select wxWidgets 3.0.x, but still I have the same problem....

Checkmark the check advanced options; what are the advanced options?
They MUST match a wxWidgets that you built to avoid the warning!

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 art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Code::Block and wxWidges 3.0.0
« Reply #4 on: November 12, 2013, 11:57:43 pm »
stahta01, the option checked in the Advanced Options :
GUI mode application both for Target and Release.
If i try still to build a get crash and the message cc1plus.exe stopped working.

May be 64 bits and Mingw 4.8.1 and wxWidgets 3.0.0 is a bad combination and I should use a different compiler to build wxWidgets 3.0.0 ?


« Last Edit: November 13, 2013, 12:03:32 am by art1221 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Code::Block and wxWidges 3.0.0
« Reply #5 on: November 13, 2013, 12:53:22 am »
stahta01, the option checked in the Advanced Options :
GUI mode application both for Target and Release.
If i try still to build a get crash and the message cc1plus.exe stopped working.

May be 64 bits and Mingw 4.8.1 and wxWidgets 3.0.0 is a bad combination and I should use a different compiler to build wxWidgets 3.0.0 ?

Mingw 4.8.1 and wxWidgets 3.0.0 has problems related to the wx/wxprec.h and wx/wx.h includes.
I never figured out exactly which headers are the cause.
I gave up; I just do NOT use either wx/wxprec.h and wx/wx.h and precompiled headers when using Mingw 4.8.1.
The wxWidgets folks blame it on the MinGW folks; I have no idea which is the cause of the issue.
(I would bet the real solution lies in fixing the MinGW GCC)

FYI: Those where NOT the options I meant to suggest checking(My Memory was faulty); Check the wxWidgets Library Settings
wxWidgets DLL
Monolib
Unicode

And, what is the debug settings in advanced settings. (__WXDEBUG__)

Tim S.
« Last Edit: November 13, 2013, 12:59:18 am 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 art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Code::Block and wxWidges 3.0.0
« Reply #6 on: November 13, 2013, 03:47:37 pm »

in

C:\wxWidgets3.0.0\lib\gcc_dll\mswu\build.cfg

WXVER_MAJOR=3
WXVER_MINOR=0
WXVER_RELEASE=0
BUILD=release
MONOLITHIC=1
SHARED=1
UNICODE=1
TOOLKIT=MSW
TOOLKIT_VERSION=
WXUNIV=0
CFG=
VENDOR=custom
OFFICIAL_BUILD=0
DEBUG_FLAG=1
DEBUG_INFO=default
RUNTIME_LIBS=dynamic
MSLU=0
USE_EXCEPTIONS=1
USE_RTTI=1
USE_THREADS=1
USE_AUI=1
USE_GUI=1
USE_HTML=1
USE_MEDIA=1
USE_OPENGL=1
USE_QA=0
USE_PROPGRID=1
USE_RIBBON=1
USE_RICHTEXT=1
USE_STC=1
USE_WEBVIEW=1
USE_XRC=1
COMPILER=gcc
COMPILER_VERSION=
CC=gcc
CXX=g++
CFLAGS=
CPPFLAGS=
CXXFLAGS=
LDFLAGS=

So build is as has been setup on the command line. i.e MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release
 I still have the same error. BTW i use Release mode, and in Advanced options DEBUG is unchecked by default, I have not changed anything in Advanced options.
May be my settings inside Code::Block are not correct? They are:

Compiler
C:\wxWidgets3.0.0\include
C:\wxWidgets3.0.0\lib\gcc_dll\mswu

Linker
C:\wxWidgets3.0.0\lib\gcc_dll

Resource Compiler
C:\wxWidgets3.0.0\include
C:\wxWidgets3.0.0\lib\gcc_dll\mswu


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Code::Block and wxWidges 3.0.0
« Reply #7 on: November 13, 2013, 03:51:56 pm »
Post the full Compiler Rebuild log.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

mingw32-make.exe -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=1 BUILD=release
Did you or did you NOT build a static wxWidgets lib as you stated in the OP?

Tim S.
« Last Edit: November 13, 2013, 03:55:05 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 art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Code::Block and wxWidges 3.0.0
« Reply #8 on: November 13, 2013, 04:23:30 pm »
stahta01, my last build of wxWidgets was

mingw32-make.exe -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release TARGET_CPU=X64

yes, a switched to dynamic libs  and also added explicit option for 64 bits.

I will try to look into build log, as you have suggested....

Here is the log:

windres.exe -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu  -J rc -O coff -i C:\_C__~1\PROJECTS\wx33\resource.rc -o obj\Release\resource.res
x86_64-w64-mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wno-attributes -Wall  -O2  -w -m64   -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu -IC:\CodeBlocks\MinGW\include -IC:\CodeBlocks\MinGW\x86_64-w64-mingw32\include -IC:\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\4.8.1\include -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu  -c C:\_C++\PROJECTS\wx33\wx33App.cpp -o obj\Release\wx33App.o
x86_64-w64-mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wno-attributes -Wall  -O2  -w -m64   -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu -IC:\CodeBlocks\MinGW\include -IC:\CodeBlocks\MinGW\x86_64-w64-mingw32\include -IC:\CodeBlocks\MinGW\lib\gcc\x86_64-w64-mingw32\4.8.1\include -IC:\wxWidgets3.0.0\include -IC:\wxWidgets3.0.0\lib\gcc_dll\mswu  -c C:\_C++\PROJECTS\wx33\wx33Main.cpp -o obj\Release\wx33Main.o
x86_64-w64-mingw32-g++.exe -LC:\wxWidgets3.0.0\lib\gcc_dll -LC:\CodeBlocks\MinGW\lib -LC:\CodeBlocks\MinGW\x86_64-w64-mingw32\lib -LC:\wxWidgets3.0.0\lib\gcc_dll  -o bin\Release\wx33.exe obj\Release\wx33App.o obj\Release\wx33Main.o  obj\Release\resource.res  -s -mthreads  -lwxmsw30u  -mwindows
c:/codeblocks/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw30u
collect2.exe: error: ld returned 1 exit status


I have searched wxWidgets  and found these files:

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_aui.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_core.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_gl.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_html.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_media.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_propgrid.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_ribbon.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_richtext.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_stc.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_webview.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_xrc.a
« Last Edit: November 13, 2013, 04:45:51 pm by art1221 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Code::Block and wxWidges 3.0.0
« Reply #9 on: November 13, 2013, 05:32:45 pm »
I have searched wxWidgets  and found these files:

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_aui.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_core.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_gl.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_html.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_media.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_propgrid.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_ribbon.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_richtext.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_stc.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_webview.a

C:\wxWidgets3.0.0\lib\gcc_lib\libwxmsw30ud_xrc.a

Those mean you built the Multilib instead of the Monolib version of wxWidgets.
You have to tell Code::Blocks the truth!!

This "gcc_lib" means you built the static version of wxWidgets!

Please confirm you built wxWidgets correctly!!

Does this folder "C:\wxWidgets3.0.0\lib\gcc_dll" exist?
If yes, what is in it?

Edit2: Read this link http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef

Tim S.

« Last Edit: November 13, 2013, 05:35:27 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 art1221

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Code::Block and wxWidges 3.0.0
« Reply #10 on: November 13, 2013, 05:53:23 pm »
Tim, looks like clean did not worked well for me. So I have created a mess by either skipping clean and using other options, or I can blame clean... :)

So, I have deleted wxWidgets, downloaded a new one and in a processed of building it, on my machine it is 30 min or so ....

wxWidgets is being built with:

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

btw, building wxW.. with Mingw I have had first to fix filectrlg.cpp,

../../src/generic/filectrlg.cpp:235:35: error: 'S_IFDIR' was not declared in this scope
         m_type |= (buff.st_mode & S_IFDIR) != 0 ? is_dir : 0;
      
      
Fix  #define S_IFDIR 0040000 /* Directory */

UPDATE: problem solved!  wxWidets 3.0.0 now compiles without problems! thank you for the help.

« Last Edit: November 13, 2013, 06:19:29 pm by art1221 »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: Code::Block and wxWidges 3.0.0
« Reply #11 on: November 13, 2013, 06:28:15 pm »
I have found that monolibs and multilibs must be built in separate wxWidgets lib config (CFG) folders.

Once you build one of them switching requires a lot of hand deletes to fix the issue; clean is never enough from my experience.

Tim S.
 
« Last Edit: November 13, 2013, 06:30:27 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