Author Topic: Building Code::Blocks on Win 64  (Read 82365 times)

jonok

  • Guest
Re: Building Code::Blocks on Win 64
« Reply #15 on: January 07, 2010, 09:33:01 pm »
Here's an update.

C::B and core plugins can now be compiled successfully on Win 64 bit platform. Do note my emphasis on the word "compiled". The code can now be compiled but is unstable at the moment!!

A patch is attached with the post.

Known issues:
1) There are couple of warnings to be fixed in Compiler depslib target.
2) crashhandler.cpp code needs to be updated to conform 64 bit api calls.
3) Scripting system is partially broken. Needs to be fixed.  <-- Fixed now. I accidentally commented one line which caused this bug.  :oops:

The patch may not work with patch tools. Manual patching may be necessary in such a case.


Edit 1: A new version of patch is uploaded. This fixes item no 3 stated above. If you have downloaded the previous file (64-bit_v1_08-Dec-09.7z), please redownload the patch. I had accidentally commented one line which caused the above bug.

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #16 on: January 12, 2010, 05:35:22 pm »
I've uploaded a test build (core app and core plugins only) to the following link which is based on C::B trunk (rev 6078) and my patchset. If you are interested then you may download it from the following link.

Quote
http://www.box.net/shared/tsoetogrd3

Note that patches needed for Squirrel has already been committed to trunk. I'm attaching remaining patch (against trunk-rev 6078) needed to build core app and plugins. Contrib plugins are not updated yet for Win 64 build.

Important Notes:
1) This is a test build. Use it for testing only.
2) You need to "Kill" it from Task Manager after you finish your work. If you close it normally, it will stay in the memory. Source of Bug - so far I've been unable to trace it.
3) Clicking Settings > Editor will cause a segfault. I've found the offending line. However that line can't be a source of this bug (I'm quite sure). I'm still looking for the real source.

As the patch matures, I'll commit them in trunk. Any feedback is always welcome. :)

Edit 1:
@Billy, please try this new patch. Build issue on Linux should get resolved.

[attachment deleted by admin]
Be a part of the solution, not a part of the problem.

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building Code::Blocks on Win 64
« Reply #17 on: January 13, 2010, 12:35:58 am »
Compiling still fails here :
Code
/bin/sh ../../../../libtool --tag=CXX   --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -O2 -pipe -march=core2 -fno-strict-aliasing  -fPIC -DPIC -fexceptions -c -o sc_wxtypes.lo sc_wxtypes.cpp                                                                                                                                         
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -pipe -march=core2 -fno-strict-aliasing -fPIC -DPIC -fexceptions -c sc_wxtypes.cpp  -fPIC -DPIC -o .libs/sc_wxtypes.o        
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:26,                                                                
                 from sc_wxtypes.cpp:18:                                                                                                            
../../../../src/include/scripting/sqplus/sqplus.h: In static member function ‘static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(SQVM*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’:                                                                    
../../../../src/include/scripting/sqplus/sqplus.h:1323:   instantiated from ‘void SqPlus::sq_pushdirectinstanceclosure(SQVM*, const Callee&, Func, SQUnsignedInteger) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’                                                                      
../../../../src/include/scripting/sqplus/sqplus.h:1407:   instantiated from ‘void SqPlus::RegisterInstance(SQVM*, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’                                                                                
../../../../src/include/scripting/sqplus/sqplus.h:1761:   instantiated from ‘SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = bool (wxGDIObject::*)()const, TClassType = wxColour]’                                                                
sc_wxtypes.cpp:223:   instantiated from here                                                                                                        
../../../../src/include/scripting/sqplus/sqplus.h:1254: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’                                                                                                                                            
make[4]: *** [sc_wxtypes.lo] Error 1                                                                                                                
make[4]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk/scripting/bindings'                          
make[3]: *** [all-recursive] Error 1                                                                                                                
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk/scripting'                                    
make[2]: *** [all-recursive] Error 1                                                                                                                
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk'                                              
make[1]: *** [all-recursive] Error 1                                                                                                                
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src'                                                  
make: *** [all-recursive] Error 1
Using wx-2.9 svn on linux 64bit

2) You need to "Kill" it from Task Manager after you finish your work. If you close it normally, it will stay in the memory. Source of Bug - so far I've been unable to trace it.
Does also happen on Win64 using a 32bit build, still need to confirm it and do more some testing
Works with the 12.01 nightly, need to check my build system on windows
« Last Edit: January 13, 2010, 09:19:54 pm by billyonthemountain »
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #18 on: January 13, 2010, 12:52:28 am »
I'll look into Linux build issue tonight. Thanks for your feedback. Hung app issue doesn't occur in 32 bit. However it crashes on normal exit. Debugger doesn't return any meaningful output on the crash. :-)
Be a part of the solution, not a part of the problem.

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building Code::Blocks on Win 64
« Reply #19 on: January 13, 2010, 01:13:24 am »
Just for interest : Using wx-2.8 on linux, fails as well but not at the same place...
Code
/bin/sh ../../../libtool --tag=CXX   --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../src/include/wxscintilla/include -I../../../src/include -I../../../src/include/tinyxml  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -O2 -pipe -march=core2 -fno-strict-aliasing  -fPIC -DPIC -fexceptions -c -o tinywxuni.lo tinywxuni.cpp                                                                                                     
libtool: compile:  x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../src/include/wxscintilla/include -I../../../src/include -I../../../src/include/tinyxml -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -pipe -march=core2 -fno-strict-aliasing -fPIC -DPIC -fexceptions -c tinywxuni.cpp  -fPIC -DPIC -o .libs/tinywxuni.o                                                                                                                       
In file included from ../../../src/include/sdk_common.h:40,                                                                                         
                 from ../../../src/include/sdk_precomp.h:13,                                                                                         
                 from tinywxuni.cpp:1:                                                                                                               
../../../src/include/prep.h:305: error: ‘wxIntPtr’ does not name a type                                                                             
../../../src/include/prep.h:307: error: expected ‘)’ before ‘in’                                                                                     
../../../src/include/prep.h:310: error: ‘wxIntPtr’ has not been declared                                                                             
../../../src/include/prep.h:316: error: expected type-specifier before ‘wxIntPtr’                                                                   
../../../src/include/prep.h: In constructor ‘ID::ID()’:                                                                                             
../../../src/include/prep.h:314: error: class ‘ID’ does not have any field named ‘value’                                                             
../../../src/include/prep.h:314: error: ‘wxIntPtr’ was not declared in this scope                                                                   
../../../src/include/prep.h: In member function ‘ID::operator void*() const’:                                                                       
../../../src/include/prep.h:317: error: ‘value’ was not declared in this scope                                                                       
../../../src/include/prep.h: In member function ‘bool ID::Valid() const’:                                                                           
../../../src/include/prep.h:319: error: ‘value’ was not declared in this scope                                                                       
../../../src/include/prep.h:319: error: ‘wxIntPtr’ was not declared in this scope                                                                   
../../../src/include/prep.h: In function ‘bool operator==(ID, ID)’:                                                                                 
../../../src/include/prep.h:322: error: ‘class ID’ has no member named ‘value’                                                                       
../../../src/include/prep.h:322: error: ‘class ID’ has no member named ‘value’                                                                       
../../../src/include/prep.h: In function ‘bool operator==(ID, int)’:                                                                                 
../../../src/include/prep.h:323: error: ‘class ID’ has no member named ‘value’                                                                       
../../../src/include/prep.h:323: error: ‘wxIntPtr’ was not declared in this scope                                                                   
../../../src/include/prep.h:323: error: expected ‘;’ before ‘b’                                                                                     
../../../src/include/prep.h: In function ‘bool operator!=(ID, ID)’:                                                                                 
../../../src/include/prep.h:325: error: ‘class ID’ has no member named ‘value’                                                                       
../../../src/include/prep.h:325: error: ‘class ID’ has no member named ‘value’                                                                       
../../../src/include/prep.h: In function ‘bool operator!=(ID, int)’:                                                                                 
../../../src/include/prep.h:326: error: ‘class ID’ has no member named ‘value’                                                                       
../../../src/include/prep.h: In function ‘ID GetID()’:                                                                                               
../../../src/include/prep.h:332: error: ‘wxIntPtr’ does not name a type                                                                             
../../../src/include/prep.h:333: error: ‘id’ was not declared in this scope                                                                         
../../../src/include/prep.h: At global scope:                                                                                                       
../../../src/include/prep.h:337: error: ‘ConstructID’ declared as an ‘inline’ variable                                                               
../../../src/include/prep.h:337: error: ‘ID ConstructID’ redeclared as different kind of symbol                                                     
../../../src/include/prep.h:310: error: previous declaration of ‘ID ConstructID(int)’                                                               
../../../src/include/prep.h:337: error: ‘wxIntPtr’ was not declared in this scope                                                                   
make[3]: *** [tinywxuni.lo] Error 1                                                                                                                 
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/base/tinyxml'                                     
make[2]: *** [all-recursive] Error 1                                                                                                                 
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/base'                                             
make[1]: *** [all-recursive] Error 1                                                                                                                 
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src'                                                 
make: *** [all-recursive] Error 1
I'm not really familiar with wxwidgets internals but it seems there's a non-negligible gap between 2.8.10 and 2.9; handling 2.8/2.9, win/linux/MacOs 32/64bits might get tricky...   :?
« Last Edit: January 13, 2010, 01:28:41 am by billyonthemountain »
(ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Building Code::Blocks on Win 64
« Reply #20 on: January 13, 2010, 04:45:19 pm »
Try the attached patch. You are right in saying that use of wxIntPtr is very tricky. It's not defined in wx-2.8. I'll modify affected codes.

Compiling still fails here :
Code
../../../../src/include/scripting/sqplus/sqplus.h:1254: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’                                                                                                                                             
make[4]: *** [sc_wxtypes.lo] Error 1                                                                                                                 
make[4]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk/scripting/bindings'                           
make[3]: *** [all-recursive] Error 1                                                                                                                 
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk/scripting'                                   
make[2]: *** [all-recursive] Error 1                                                                                                                 
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk'                                             
make[1]: *** [all-recursive] Error 1                                                                                                                 
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src'                                                 
make: *** [all-recursive] Error 1
Using wx-2.9 svn on linux 64bit

I couldn't reproduce this on my 32 bit machine. Are you still getting this error?

[attachment deleted by admin]
Be a part of the solution, not a part of the problem.

Offline billyonthemountain

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Building Code::Blocks on Win 64
« Reply #21 on: January 13, 2010, 09:01:55 pm »
Here are my test results : (all done against revision 6083)

  • Vanilla sources, wx-2.8.10, linux 64-bits : build succeeds
  • With the latest patch, wx-2.8.10, linux 64-bits : build fails
Code
Making all in lexers                                                                                          
[...]            
make[3]: Entering directory `/home/paccolat/tmp/devel/codeblocks_linux64/trunk/src/sdk'                      
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include -I../../src/include/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT nullptr.lo -MD -MP -MF ".deps/nullptr.Tpo" -c -o nullptr.lo nullptr.cpp; \                                                                                                                                      
        then mv -f ".deps/nullptr.Tpo" ".deps/nullptr.Plo"; else rm -f ".deps/nullptr.Tpo"; exit 1; fi                                              
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include -I../../src/include/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT nullptr.lo -MD -MP -MF .deps/nullptr.Tpo -c nullptr.cpp  -fPIC -DPIC -o .libs/nullptr.o    
In file included from nullptr.cpp:10:                                                                                                                
../../src/include/prep.h:312: error: ‘size_t’ does not name a type                                                                                  
../../src/include/prep.h:314: error: expected ‘)’ before ‘in’                                                                                        
../../src/include/prep.h:317: error: ‘size_t’ has not been declared                                                                                  
../../src/include/prep.h:323: error: expected type-specifier before ‘size_t’                                                                        
../../src/include/prep.h: In constructor ‘ID::ID()’:                                                                                                
../../src/include/prep.h:321: error: class ‘ID’ does not have any field named ‘value’                                                                
../../src/include/prep.h:321: error: ‘size_t’ was not declared in this scope                                                                        
../../src/include/prep.h: In member function ‘ID::operator void*() const’:                                                                          
../../src/include/prep.h:324: error: ‘value’ was not declared in this scope                                                                          
../../src/include/prep.h: In member function ‘bool ID::Valid() const’:                                                                              
../../src/include/prep.h:326: error: ‘value’ was not declared in this scope                                                                          
../../src/include/prep.h:326: error: ‘size_t’ was not declared in this scope                                                                        
../../src/include/prep.h: In function ‘bool operator==(ID, ID)’:                                                                                    
../../src/include/prep.h:329: error: ‘class ID’ has no member named ‘value’                                                                          
../../src/include/prep.h:329: error: ‘class ID’ has no member named ‘value’                                                                          
../../src/include/prep.h: In function ‘bool operator==(ID, int)’:                                                                                    
../../src/include/prep.h:330: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h:330: error: ‘size_t’ was not declared in this scope
../../src/include/prep.h:330: error: expected ‘;’ before ‘b’
../../src/include/prep.h: In function ‘bool operator!=(ID, ID)’:
../../src/include/prep.h:332: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h:332: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h: In function ‘bool operator!=(ID, int)’:
../../src/include/prep.h:333: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h: In function ‘ID GetID()’:
../../src/include/prep.h:339: error: ‘size_t’ does not name a type
../../src/include/prep.h:340: error: ‘id’ was not declared in this scope
../../src/include/prep.h: At global scope:
../../src/include/prep.h:344: error: ‘ConstructID’ declared as an ‘inline’ variable
../../src/include/prep.h:344: error: ‘ID ConstructID’ redeclared as different kind of symbol
../../src/include/prep.h:317: error: previous declaration of ‘ID ConstructID(int)’
../../src/include/prep.h:344: error: ‘size_t’ was not declared in this scope

  • Vanilla sources, wx-2.9-svn, linux 64 : build fails
Code
Making all in bindings                                                                                                                               
make[4]: Entering directory `/home/paccolat/tmp/devel/codeblocks_linux64/trunk/src/sdk/scripting/bindings'                                          
if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF ".deps/sc_wxtypes.Tpo" -c -o sc_wxtypes.lo sc_wxtypes.cpp; \                                                                                                          
        then mv -f ".deps/sc_wxtypes.Tpo" ".deps/sc_wxtypes.Plo"; else rm -f ".deps/sc_wxtypes.Tpo"; exit 1; fi                                      
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF .deps/sc_wxtypes.Tpo -c sc_wxtypes.cpp  -fPIC -DPIC -o .libs/sc_wxtypes.o
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:26,
                 from sc_wxtypes.cpp:18:
../../../../src/include/scripting/sqplus/sqplus.h: In static member function ‘static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(SQVM*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’:
../../../../src/include/scripting/sqplus/sqplus.h:1313:   instantiated from ‘void SqPlus::sq_pushdirectinstanceclosure(SQVM*, const Callee&, Func, SQUnsignedInteger) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1397:   instantiated from ‘void SqPlus::RegisterInstance(SQVM*, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1751:   instantiated from ‘SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = bool (wxGDIObject::*)()const, TClassType = wxColour]’
sc_wxtypes.cpp:223:   instantiated from here
../../../../src/include/scripting/sqplus/sqplus.h:1244: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’

  • With latest patch, wx-2.9-svn, linux 64 : build fails (same place as before)
Code
Making all in bindings                                                                                                                               
make[4]: Entering directory `/home/paccolat/tmp/devel/codeblocks_linux64/trunk/src/sdk/scripting/bindings'                                          
if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF ".deps/sc_wxtypes.Tpo" -c -o sc_wxtypes.lo sc_wxtypes.cpp; \                                                                                                          
        then mv -f ".deps/sc_wxtypes.Tpo" ".deps/sc_wxtypes.Plo"; else rm -f ".deps/sc_wxtypes.Tpo"; exit 1; fi                                      
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF .deps/sc_wxtypes.Tpo -c sc_wxtypes.cpp  -fPIC -DPIC -o .libs/sc_wxtypes.o                                                                                                                                    
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:26,                                                                
                 from sc_wxtypes.cpp:18:                                                                                                            
../../../../src/include/scripting/sqplus/sqplus.h: In static member function ‘static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(SQVM*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’:
../../../../src/include/scripting/sqplus/sqplus.h:1323:   instantiated from ‘void SqPlus::sq_pushdirectinstanceclosure(SQVM*, const Callee&, Func, SQUnsignedInteger) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1407:   instantiated from ‘void SqPlus::RegisterInstance(SQVM*, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1761:   instantiated from ‘SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = bool (wxGDIObject::*)()const, TClassType = wxColour]’
sc_wxtypes.cpp:223:   instantiated from here
../../../../src/include/scripting/sqplus/sqplus.h:1254: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’

    Looks like the patch still breaks the wx-2.8 build, wx-2.9 unaffected so far (wx-2.9 migration issue)
    Hope it helps...
    « Last Edit: January 14, 2010, 03:17:46 am by billyonthemountain »
    (ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

    Offline vityan

    • Single posting newcomer
    • *
    • Posts: 4
    Re: Building Code::Blocks on Win 64
    « Reply #22 on: April 01, 2010, 01:55:23 pm »
    C::B Build 6198
    WxWidGets 2.91 SVN(31.03.2010)
    MingW-W64 27.03.2010 Native Compiler(X64 -> X64) by sezero(Personal builds on MingW-W64 download section)


    Status: SUCCESS build of native C::B X64 :)


    Ok - I've worked on it 2 days(Don't afraid of post count of 1 post - I'm old happy C::B user and old C developer and building C::B/WxWidgets from source for more than year).


    Let's start.

    Prerequecities:

    1)WxWidgets 2.91-SVN(Don't use nightly snapshots as they missing the Ribon subfolders in the archive)
    2)My small fix-up for WxWidgets Source Code(One header file):
      include\wx\msw\listctrl.h
      
      Find:
       // Sets the item data
        bool SetItemPtrData(long item, wxUIntPtr data);
        bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }

      Replace to:
         // Sets the item data
        bool SetItemPtrData(long item, wxUIntPtr data);
        bool SetItemData(long item, wxUIntPtr data) { return SetItemPtrData(item, data); }

    3)C::B HEAD Source Code.
    4)My Patch against C::B Source for Win-X64(The patch is very big and thus cannot be posted in the message body):
       http://pastebin.com/QjZW8n9G


    5) Disable PCH in C::B Project settings(Remove CB_PRECOMP and WX_PRECOMP defines)

    Now build it.

    NOTE: I currently have one last problem with WxWidgets X64 library mislinking(ld link it with empty Export table i.e without symbols and thus the library is not usefull now. Ima working on this issue currently - Gonna try debug builds and as the last resort build static library).
    I gonna inform here about the progress ;)

    Offline MortenMacFly

    • Administrator
    • Lives here!
    • *****
    • Posts: 9694
    Re: Building Code::Blocks on Win 64
    « Reply #23 on: April 01, 2010, 04:58:20 pm »
    Status: SUCCESS build of native C::B X64 :)
    Although this is great news, please remember the following:
    - there has already been done s lot work on this especially for the scripting engine
    - both works should be merged
    - your patch has a lot diffs due to white spaces and tabs which makes it hard to read
    - please respect that as we in feature freeze there won't be much work on this atm (and only atm).
    - please post this on the patch tracker, too therefore (probably after a clean-up concerning the white spaces).
    Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
    C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
    C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

    Offline vityan

    • Single posting newcomer
    • *
    • Posts: 4
    Re: Building Code::Blocks on Win 64
    « Reply #24 on: April 01, 2010, 05:50:34 pm »
    [MortenMacFly]

    Quote
    - there has already been done s lot work on this especially for the scripting engine
    I know - I view the list of changes commited by you,shahta and other active members and there are moves to X64 compatability.
    Anyway there are still some work to be done.

    Quote
    - both works should be merged
    - your patch has a lot diffs due to white spaces and tabs which makes it hard to read

    This is Tortoise's Diff fault :) The patch has some "dummy changes"(Then code wth "-" gets replaced with exactly same code with "+" sign).

    The change set can be reduced drastically by fixing "Basic types overlap" bug in SCPlus.
    In short:
    scplus.h defines INT,BOOL and FLAT types but those are already defined in windef.h in MingW-W64. While INT type is 32 bit in MingW64 ScPlus enforces it to be 64 bit(shahta's workaround i think). While scplus.h has protect against inclusion of windef.h vice versa doesn't apply(windef.h ofc doesn't check for inclusion of scplus.h and tries to redefine the types).

    After a lot of headaches with those ive made a clear decision that defined types SHOULD NEVER overlap with Compiler's internal type and thus(Using UltraEdit Find And Replace in Files) replaced all INT,BOOL and FLOAT in SCPlus(Header+Src) with non-conflicting safe types CBINT,CBBOOL,CBFLOAT. This change is the biggest part of the patch file(about 70-80%) while portability fixes are 5-9 patches(Pointers extensions to be 64 bit(I dont "shrink" pointers by casting - Thats not a way of porting) and some extensions to interface functions of some classes with work with different types of data - extended to work with long long type too(Maximum supported integer was long which is 32 bit integer)).

    Quote
    - please respect that as we in feature freeze there won't be much work on this atm (and only atm).

    I've read about it today and im glad that C::B finally reached the release point(Congrats about this grea event).
    I know that such drastic changes will not enter trunk anytime soon but i wish you'r understanding that ppl will be able to apply a patch to official sources and run "X64" Edition unofficially until it will get merged(i suppose it will be changed a lot for merge :))

    Quote
    - please post this on the patch tracker, too therefore (probably after a clean-up concerning the white spaces).

    Ill do it then ill be able to build fully working C::B(Till now it is unable to run yet. Release builds of WxWidgets 2.91 are miscompiled resulting in invalid PE module and debug builds compiles better but causes codeblcoks.dll module to crash. Im currently trying static builds).

    Offline ironhead

    • Almost regular
    • **
    • Posts: 210
    Re: Building Code::Blocks on Win 64
    « Reply #25 on: August 17, 2010, 02:27:28 pm »
    Sorry for reviving such an old thread, but is there any plans to incorporate the Win64 changes into Code::Blocks svn?  I'm trying to compile it for my Win7 64-bit machine and hitting similar issues to those mentioned in this thread.

    Thank you.

    Offline Biplab

    • Developer
    • Lives here!
    • *****
    • Posts: 1874
      • Biplab's Blog
    Re: Building Code::Blocks on Win 64
    « Reply #26 on: August 17, 2010, 03:10:35 pm »
    Sorry for reviving such an old thread, but is there any plans to incorporate the Win64 changes into Code::Blocks svn?  I'm trying to compile it for my Win7 64-bit machine and hitting similar issues to those mentioned in this thread.

    Thank you.

    Thank you for reviving this old thread! :)

    The answer is Yes, it will be incorporated in SVN. I was waiting for the new release. Now as the release process is over, I'll commit those changes to trunk. But it will take some time. At least I target committing major portion of patch to trunk within few months. There are few things holding me at the moment.

    1) I am using WPG-System64 to compile C::B under Windows 64. However I believe WPG-System64 project is currently unmaintained and I would like to move to MinGW-w64 released builds. However if I use MinGW-w64 compiler C::B compiles fine; but it crashes when I try to run it. GDB also doesn't give crash report. If I can't resolve that I may need to stay with WPG-System64 compiler unless I find some suitable alternative.

    2) I still could not figure out a good way to resolve hang-on-exit bug. This is a major blocker for us at the moment.

    Any help in this regard is appreciated. :)
    Be a part of the solution, not a part of the problem.

    Offline oBFusCATed

    • Developer
    • Lives here!
    • *****
    • Posts: 13413
      • Travis build status
    Re: Building Code::Blocks on Win 64
    « Reply #27 on: August 17, 2010, 03:25:11 pm »
    2) I still could not figure out a good way to resolve hang-on-exit bug. This is a major blocker for us at the moment.
    This could be related to this:
    http://forums.codeblocks.org/index.php/topic,10908.msg87337.html#msg87337

    Also on linux I get this crash:

    Code
    (gdb) bt
    #0  0x0000000000000021 in ?? ()
    #1  0x00007ffff7aa33a0 in wxPGGlobalVarsClass::~wxPGGlobalVarsClass() () from /usr/lib/libcodeblocks.so.0
    #2  0x00007ffff7ab9508 in wxPGGlobalVarsClassManager::~wxPGGlobalVarsClassManager() () from /usr/lib/libcodeblocks.so.0
    #3  0x00007ffff485aa25 in __cxa_finalize () from /lib/libc.so.6
    #4  0x00007ffff7782556 in ?? () from /usr/lib/libcodeblocks.so.0
    #5  0x0000000000000076 in ?? ()
    #6  0x0000000000000000 in ?? ()
    This is related to the wxPG 1.4 and happens only when I build C::B with autotools sysmem.
    « Last Edit: August 17, 2010, 05:41:57 pm by oBFusCATed »
    (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 billyonthemountain

    • Multiple posting newcomer
    • *
    • Posts: 40
    Re: Building Code::Blocks on Win 64
    « Reply #28 on: August 17, 2010, 09:21:34 pm »
    If I can't resolve that I may need to stay with WPG-System64 compiler unless I find some suitable alternative.
    Did you try with TDragon's multilib build of GCC ? It's not a native 64bit compiler but it should do the job until the issues with mingw-w64 have been solved...

    @Biplab: I haven't seen vityan's updated patch on the tracker so I suppose your patch "64bit-13-01-10_v1" is still the last version ?
    (ASM, C/C++)||(VISION&AI)||(EMBEDDED SYSTEMS)

    Offline TDragon

    • Lives here!
    • ****
    • Posts: 943
      • TDM-GCC
    Re: Building Code::Blocks on Win 64
    « Reply #29 on: August 17, 2010, 09:36:51 pm »
    Did you try with TDragon's multilib build of GCC ? It's not a native 64bit compiler but it should do the job until the issues with mingw-w64 have been solved...

    It's the closest thing to a native 64-bit compiler you're going to find. It's configured with build, host, and target system all assigned as x86_64-w64-mingw32. Even the MinGW-w64 project itself doesn't distribute a build with this configuration.

    If the fact that the compiler binaries are 32-bit is causing problems for you, I'd definitely like to hear about it.
    https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)