Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Rev. 7830 build issues

<< < (2/4) > >>

stahta01:

--- Quote from: MortenMacFly on February 22, 2012, 06:51:20 am ---...could you try this patch, please:

--- Code: ---Index: src/plugins/debuggergdb/debugger_defs.h
===================================================================
--- src/plugins/debuggergdb/debugger_defs.h (revision 7830)
+++ src/plugins/debuggergdb/debugger_defs.h (working copy)
@@ -222,9 +222,13 @@
     }
     bool valid; ///< Is this stack frame valid?
     // 64 bit compatibility: don't use unsigned long int here:
+#if defined(_WIN64)
     size_t number; ///< Stack frame's number (used in backtraces).
-    // ...and here:
     size_t address; ///< Stack frame's address.
+#else
+    unsigned long int number; ///< Stack frame's number (used in backtraces).
+    unsigned long int address; ///< Stack frame's address.
+#endif
     wxString function; ///< Current function name.
     wxString file; ///< Current file.
     wxString line; ///< Current line in file.

--- End code ---

--- End quote ---

Win32 build of Code::Blocks main project compiled with the above patch did not try running or compiling contrib projects.

Tim S.

killerbot:
why not always have both variables being of type unsigned long ?

MortenMacFly:

--- Quote from: killerbot on February 22, 2012, 07:43:26 am ---why not always have both variables being of type unsigned long ?

--- End quote ---
Because on 32 bit its unsigned long int, on 64 bit its unsigned long long (size_t).

MortenMacFly:

--- Quote from: stahta01 on February 22, 2012, 07:35:11 am ---did not try running or compiling contrib projects.

--- End quote ---
Contrib plugins are not yet supported for 64 bit builds, 32 bit builds should not be affected.

ironhead:

--- Quote from: MortenMacFly on February 22, 2012, 08:01:09 am ---
--- Quote from: killerbot on February 22, 2012, 07:43:26 am ---why not always have both variables being of type unsigned long ?

--- End quote ---
Because on 32 bit its unsigned long int, on 64 bit its unsigned long long (size_t).

--- End quote ---

Why not just use size_t and leave it to the compiler to sort out?  32-bit MinGW will define size_t appropriately, as will 64-bit mingw-w64.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version