Kirix Support Forums

Compilation on 64 bit platforms

Please post any wxAUI patches or modifications you've created here. Thanks!

Compilation on 64 bit platforms

Postby abligh on Tue Jan 10, 2006 3:22 pm

In order to compile on a 64 bit platform, you need to apply the following patch to 0.9.1 (available under the wxWidgets license trivial though the patch is). It should not affect 32-bit compilation.

Code: Select all
diff -u -r src/manager.cpp src/manager.cpp
--- wxaui-0.9.1.orig/src/manager.cpp    2006-01-10 17:11:39.000000000 +0000
+++ wxaui-0.9.1/src/manager.cpp 2006-01-10 20:14:30.000000000 +0000
@@ -1160,7 +1160,7 @@
     if (pinfo.name.IsEmpty())
     {
         pinfo.name.Printf(wxT("%08x%08x%08x%08x"),
-             (unsigned int)pinfo.window, (unsigned int)time(NULL),
+             pinfo.window, (unsigned int)time(NULL),
              (unsigned int)clock(), m_panes.GetCount());
     }


abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Postby Ben on Tue Jan 10, 2006 4:04 pm

Wow, sorry. I thought I had applied that one. I guess it slipped through my fingers.

Sorry about that. I'll get it in next time.
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby tenmon on Mon Jan 23, 2006 8:04 pm

Sorry, it shouldn't be:

Code: Select all
+             (unsigned long)pinfo.window, (unsigned int)time(NULL),

instead of
Code: Select all
+             pinfo.window, (unsigned int)time(NULL),

or
Code: Select all
+             (unsigned int)pinfo.window, (unsigned int)time(NULL),


I'm asking because (in case you didn't know), on most platforms
Code: Select all
sizeof(void*) == sizeof(long)



On 32 bits: sizeof(void*) == 32 bits
On 32 bits: sizeof(int) == 32 bits
On 32 bits: sizeof(long) == 32 bits

On 64 bits: sizeof(void*) == 64 bits
On 64 bits: sizeof(int) == 32 bits
On 64 bits: sizeof(long) == 64 bits

That's the most common, at least.
tenmon
Registered User
 
Posts: 9
Joined: Wed Dec 28, 2005 7:16 pm

Postby Guest on Tue Jan 24, 2006 12:59 am

Yup, although technically, it needs to be:

Code: Select all
((unsigned long)pinfo.window) & 0xffffffff


This is the way I ended up patching it.

The pointer is simply used as a randomizing element for a unique window name, when one is not specified.
[/code]
Guest
 

Return to wxAUI Patches & Modifications