Author Topic: Anyone Compile Code::Blocks using mingw-w64  (Read 5689 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Anyone Compile Code::Blocks using mingw-w64
« on: December 27, 2008, 08:54:16 am »
To all:

I just upgraded my computer to WinXP 64-bit and installed MinGW64.
And, I was wandering if anyone compiled Code::Blocks in native AMD 64 bit using MinGW64.
http://sourceforge.net/projects/mingw-w64/

I have not been able to Compile wxWidgets trunk with MinGW64 because wsock32.a library is missing in MinGW64. And, I was wandering if that was a first of many missing libraries or not.

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 Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Anyone Compile Code::Blocks using mingw-w64
« Reply #1 on: December 27, 2008, 01:30:42 pm »
I see libws2_32.a... wouldn't that one work?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Anyone Compile Code::Blocks using mingw-w64
« Reply #2 on: December 27, 2008, 06:06:49 pm »
I see libws2_32.a... wouldn't that one work?

Thanks, I will try that.

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: 7582
    • My Best Post
Re: Anyone Compile Code::Blocks using mingw-w64
« Reply #3 on: December 27, 2008, 11:23:42 pm »
I could build wxWidgets 2.9 after doing the change from wsock32 to ws2_32.

The building of wxWidgets 2.8 has way too many errors for me to want to fix.

The build of Code::Blocks fails in the squirrel section.
Note: This is not because of wxWidgets 2.9; I have been building C::B with wx2.9 for over an week without errors.

Patched squirrel; now it has compiler errors in wxscintilla.
Patched wxscintilla; now it has compiler errors in SDK with errors pointing issues in squirrel sqPlus.

No idea if squirrel patch will work right, but here it is.

Code
Index: src/sdk/scripting/sqplus/SquirrelVM.cpp
===================================================================
--- src/sdk/scripting/sqplus/SquirrelVM.cpp (revision 5363)
+++ src/sdk/scripting/sqplus/SquirrelVM.cpp (working copy)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <string.h>
 #include <stdarg.h>
 
 #define _DEBUG_DUMP
Index: src/include/scripting/include/squirrel.h
===================================================================
--- src/include/scripting/include/squirrel.h (revision 5363)
+++ src/include/scripting/include/squirrel.h (working copy)
@@ -40,8 +40,8 @@
 #endif
 
 // C::B patch: so it builds on 64bit
-#ifdef _LP64
-    #define _SQ64
+#if (defined(_WIN64) || defined(_LP64))
+#define _SQ64
 #endif
 
 #ifdef _SQ64
@@ -49,6 +49,10 @@
 typedef __int64 SQInteger;
 typedef unsigned __int64 SQUnsignedInteger;
 typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
+#elif defined(__MINGW64__)
+typedef int SQInteger;
+typedef unsigned int SQUnsignedInteger;
+typedef unsigned long long SQHash; /*should be the same size of a pointer*/
 #else
 typedef long SQInteger;
 typedef unsigned long SQUnsignedInteger;
Index: src/include/scripting/squirrel/sqtable.h
===================================================================
--- src/include/scripting/squirrel/sqtable.h (revision 5363)
+++ src/include/scripting/squirrel/sqtable.h (working copy)
@@ -10,7 +10,7 @@
 #include "sqstring.h"
 
 
-#define hashptr(p)  ((SQHash)(((SQInteger)p) >> 3))
+#define hashptr(p)  ((SQHash)(((SQHash)p) >> 3))
 
 inline SQHash HashObj(const SQObjectPtr &key)
 {


Tim S

« Last Edit: December 29, 2008, 06:06:08 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