Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jvpic on October 16, 2014, 04:40:32 pm

Title: C::B 13.12 & wxWidgets 3.0.2
Post by: jvpic on October 16, 2014, 04:40:32 pm
Hi all,

First excuse me for my poor english !
I can't compile wxWidgetsdefault  project.
Environment Windows 7 64bits
code::Blocks : codeblocks-13.12mingw-setup.exe install on c:\program files(x32)\devel\
wxWidgets 3.02 wxMSW-3.0.2_gcc471TDM_Dev.7z et wxWidgets-3.0.2_headers.7z extracted  on d:\dev\wxWidgets3.0.2\

Global compiler settings/serch directories/compiler : d:\dev\wxWidgets3.0.2\include
                                /linker : /compiler : d:\dev\wxWidgets3.0.2\lib
Project builds options/serach directories/compiler : d:\dev\wxWidgets3.0.2\include
                                          d:\dev\wxWidgets3.0.2\include\wx
                              /linker : d:\dev\wxWidgets3.0.2\lib\gcc471TDM_dll\mswud

Compile debug mode:
Build messages:
||=== Build: Debug in Adonis (compiler: GNU GCC Compiler) ===|
D:\Dev\wxWidgets3.0.2\include\wx\platform.h|183|fatal error: wx/setup.h: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Build log:
-------------- Clean: Debug in Adonis (compiler: GNU GCC Compiler)---------------

Cleaned "Adonis - Debug"

-------------- Build: Debug in Adonis (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -ID:\Dev\wxWidgets-3.0.2\include -ID:\Dev\wxWidgets3.0.2\include\wx -ID:\Dev\wxWidgets-3.0.2\lib\gcc_dll\mswud -ID:\Dev\wxWidgets3.0.2\include -c D:\Calc\Adonis\LibGrid\Adonis\wx_pch.h -o wx_pch.h.gch\Debug_wx_pch_h_gch
In file included from D:\Dev\wxWidgets3.0.2\include/wx/defs.h:27:0,
                 from D:\Dev\wxWidgets3.0.2\include/wx/wxprec.h:12,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
D:\Dev\wxWidgets3.0.2\include/wx/platform.h:183:22: fatal error: wx/setup.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
====================================================================================================
Adding Project builds options/serach directories/compiler : d:\dev\wxWidgets3.0.2\include
                                                  d:\dev\wxWidgets3.0.2\include\wx
                                             d:\dev\wxWidgets3.0.2\lib\gcc471TDM_dll\mswud
Compiling again :
Build messages:
||=== Build: Debug in Adonis (compiler: GNU GCC Compiler) ===|
D:\Dev\wxWidgets3.0.2\include\wx\longlong.h|45|warning: #warning "Your compiler does not appear to support 64 bit " "integers, using emulation class instead.\n" "Please report your compiler version to " "wx-dev@lists.wxwidgets.org!" [-Wcpp]|
D:\Dev\wxWidgets3.0.2\include\wx\longlong.h|787|error: 'wxString' does not name a type|
...
D:\Dev\wxWidgets3.0.2\include\wx\longlong.h|858|error: 'wxASSERT' was not declared in this scope|
...
D:\Dev\wxWidgets3.0.2\include\wx\buffer.h|81|error: 'wxNO_LEN' was not declared in this scope|
...
D:\Dev\wxWidgets3.0.2\include\wx\buffer.h||In member function 'wxScopedCharTypeBuffer<T>::CharType* wxScopedCharTypeBuffer<T>::release() const':|
D:\Dev\wxWidgets3.0.2\include\wx\buffer.h|138|error: there are no arguments to 'wxT' that depend on a template parameter, so a declaration of 'wxT' must be available [-fpermissive]|
...
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 1 warning(s) (0 minute(s), 5 second(s)) ===|

Build log:
-------------- Clean: Debug in Adonis (compiler: GNU GCC Compiler)---------------

Cleaned "Adonis - Debug"

-------------- Build: Debug in Adonis (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -D__WXDEBUG__ -ID:\Dev\wxWidgets-3.0.2\include -ID:\Dev\wxWidgets3.0.2\include\wx -ID:\Dev\wxWidgets3.0.2\lib\gcc471TDM_dll\mswud -ID:\Dev\wxWidgets-3.0.2\lib\gcc_dll\mswud -ID:\Dev\wxWidgets3.0.2\include -c D:\Calc\Adonis\LibGrid\Adonis\wx_pch.h -o wx_pch.h.gch\Debug_wx_pch_h_gch
In file included from D:\Dev\wxWidgets3.0.2\include\wx/time.h:13:0,
                 from D:\Dev\wxWidgets3.0.2\include/wx/wxcrtbase.h:38,
                 from D:\Dev\wxWidgets3.0.2\include\wx/string.h:45,
                 from D:\Dev\wxWidgets3.0.2\include/wx/chartype.h:105,
                 from D:\Dev\wxWidgets3.0.2\include/wx/debug.h:19,
                 from D:\Dev\wxWidgets3.0.2\include/wx/defs.h:695,
                 from D:\Dev\wxWidgets3.0.2\include/wx/wxprec.h:12,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
D:\Dev\wxWidgets3.0.2\include/wx/longlong.h:45:10: warning: #warning "Your compiler does not appear to support 64 bit " "integers, using emulation class instead.\n" "Please report your compiler version to " "wx-dev@lists.wxwidgets.org!" [-Wcpp]
In file included from D:\Dev\wxWidgets3.0.2\include\wx/time.h:13:0,
                 from D:\Dev\wxWidgets3.0.2\include/wx/wxcrtbase.h:38,
                 from D:\Dev\wxWidgets3.0.2\include\wx/string.h:45,
                 from D:\Dev\wxWidgets3.0.2\include/wx/chartype.h:105,
                 from D:\Dev\wxWidgets3.0.2\include/wx/debug.h:19,
                 from D:\Dev\wxWidgets3.0.2\include/wx/defs.h:695,
                 from D:\Dev\wxWidgets3.0.2\include/wx/wxprec.h:12,
                 from ./wx_pch.h:14,
                 from <command-line>:0:
D:\Dev\wxWidgets3.0.2\include/wx/longlong.h:787:5: error: 'wxString' does not name a type
D:\Dev\wxWidgets3.0.2\include/wx/longlong.h:797:5: error: 'wxString' does not name a type
D:\Dev\wxWidgets3.0.2\include/wx/longlong.h: In member function 'long int wxLongLongWx::ToLong() const':
D:\Dev\wxWidgets3.0.2\include/wx/longlong.h:690:76: error: 'wxT' was not declared in this scope
D:\Dev\wxWidgets3.0.2\include/wx/longlong.h:690:78: error: 'wxASSERT_MSG' was not declared in this scope
...
D:\Dev\wxWidgets3.0.2\include/wx/unichar.h:45:5: error: 'value_type' does not name a type
Process terminated with status 1 (0 minute(s), 5 second(s))
50 error(s), 1 warning(s) (0 minute(s), 5 second(s))
 
 
 Many thanks for your help !
 
 jvpic
                                          
Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: stahta01 on October 17, 2014, 12:43:01 am
I am guessing you used the CB ScriptedWizard to build the CB wxWidgets project.
If false, please state that.

You also downloaded the wxWidgets prebuilt development files.

I believe the CB Wizard needs fixed for those choices to work.

I will see if I can fix the CB Wizard for those choices.

Tim S.
   
Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: ollydbg on October 17, 2014, 01:47:17 am
I see a folder named "mswud", maybe, you need "mswu" instead.
Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: Alpha on October 17, 2014, 01:50:47 am
wxWidgets 3.02 wxMSW-3.0.2_gcc471TDM_Dev.7z et wxWidgets-3.0.2_headers.7z extracted  on d:\dev\wxWidgets3.0.2\
It needs to be built... Edit: Redacted.  I saw the line
D:\Dev\wxWidgets3.0.2\include\wx\platform.h|183|fatal error: wx/setup.h: No such file or directory|
which was all too familiar to me, and jumped to conclusions.
Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: stahta01 on October 17, 2014, 02:25:57 am
wxWidgets 3.02 wxMSW-3.0.2_gcc471TDM_Dev.7z et wxWidgets-3.0.2_headers.7z extracted  on d:\dev\wxWidgets3.0.2\
It needs to be built...

Not really; the wizard created project needs edited.

Tim S.
Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: stahta01 on October 17, 2014, 02:30:38 am
The steps I used to edit the CB wizard created wxWidgets 3.0 Mulitlib project.


1. Created CB custom variable at project level of WX_COMPILER with value of gcc471TDM
2. Replace the search folders with values of

"$(#wx30\lib\gcc_dll\mswu" with "$(#wx30.lib)\$(WX_COMPILER)_dll\mswu"
"$(#wx30\lib\gcc_dll\mswud" with "$(#wx30.lib)\$(WX_COMPILER)_dll\mswud"

"$(#wx30\lib\gcc_dll" with "$(#wx30.lib)\$(WX_COMPILER)_dll"

I am thinking that is all the project changes that I did; but, I might have missed some.

Tim S.

Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: stahta01 on October 17, 2014, 02:35:33 am
My build log

Code
-------------- Build: ReleaseWin32 in wxMSW-3.0.2_gcc471TDM_Dev (compiler: GNU GCC Compiler)---------------

windres.exe --use-temp-file -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxMSW-3.0.2_gcc471TDM_Dev\lib\gcc471TDM_dll\mswu -J rc -O coff -i E:\Test\WXMSW-~1.2_G\resource.rc -o obj\ReleaseWin32\resource.res
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxMSW-3.0.2_gcc471TDM_Dev\lib\gcc471TDM_dll\mswu -c E:\Test\wxMSW-3.0.2_gcc471TDM_Dev\wxMSW_3_0_2_gcc471TDM_DevApp.cpp -o obj\ReleaseWin32\wxMSW_3_0_2_gcc471TDM_DevApp.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxMSW-3.0.2_gcc471TDM_Dev\lib\gcc471TDM_dll\mswu -c E:\Test\wxMSW-3.0.2_gcc471TDM_Dev\wxMSW_3_0_2_gcc471TDM_DevMain.cpp -o obj\ReleaseWin32\wxMSW_3_0_2_gcc471TDM_DevMain.o
mingw32-g++.exe -LC:\wxMSW-3.0\wxMSW-3.0.2_gcc471TDM_Dev\lib\gcc471TDM_dll -o bin\ReleaseWin32\wxMSW-3.0.exe  obj\ReleaseWin32\wxMSW_3_0_2_gcc471TDM_DevApp.o obj\ReleaseWin32\wxMSW_3_0_2_gcc471TDM_DevMain.o obj\ReleaseWin32\resource.res -s -mthreads  -lwxmsw30u_core -lwxbase30u -lwxpng -lwxzlib -mwindows
Output file is bin\ReleaseWin32\wxMSW-3.0.exe with size 534.00 KB
Process terminated with status 0 (0 minute(s), 25 second(s))
0 error(s), 0 warning(s) (0 minute(s), 25 second(s))

NOTE: The OP seems to have copied both wxWidgets downloaded files into a single folder; I did NOT do that.

wxWidgets header/source is in
   C:\wxMSW-3.0\wxWidgets-3.0.2

wxWidgets binary is in
C:\wxMSW-3.0\wxMSW-3.0.2_gcc471TDM_Dev


CB Global variable WX30
base: C:\wxMSW-3.0\wxWidgets-3.0.2
lib: C:\wxMSW-3.0\wxMSW-3.0.2_gcc471TDM_Dev\lib


Tim S.
Title: Re: C::B 13.12 & wxWidgets 3.0.2
Post by: jvpic on October 17, 2014, 11:06:47 am
Thank you,

I shall try your recipes as soon as possible and tell you the results.

jvpic