Bug #6972 2006-04-04 10:44

karakas

It's wxUsleep, not wxUSleep

I get a compiler error when trying to compile with wxGTK wxGTK-2.5.3.1. That's because the check for wxGTK > 2.6 contains the wrong function name to be called in the 2.5 case. Use this simple patch to correct it:

--- src/sdk/cbthreadpool.cpp    2005-10-25 09:59:02.000000000 +0200
+++ src/sdk/cbthreadpool.cpp    2006-04-03 23:22:00.000000000 +0200
@@ -250,7 +250,7 @@
 #if wxCHECK_VERSION(2,6,0)^M
     wxMilliSleep(1);^M
 #else^M
-    wxUSleep(1);^M
+    wxUsleep(1);^M
 #endif^M
 ^M
     wxLogNull logNo;^M
@@ -265,7 +265,7 @@
 #if wxCHECK_VERSION(2,6,0)^M
             wxMilliSleep(1);^M
 #else^M
-            wxUSleep(1);^M
+            wxUsleep(1);^M
 #endif^M
             if(++count > 10)^M
                 break;^M
Category
 
Group
 
Status
Closed
Close date
2006-04-10 08:46
Assigned to
 
mandrav 2006-04-05 08:15

Actually, I don't think C::B can be built anymore with anything less than wx2.6.0.

If you managed to build it, without other modifications, I 'll apply this patch (but please post it in the patch tracker). Else it is considered obsolete code which will be removed in a future cleanup...

ID_24639 2006-04-08 21:57

You cannot build C::B with anything less than wx 2.6.1. because of wxLaunchDefaultBrowser(). This is not a bug.

karakas 2006-04-08 22:09

Yes, I could compile it without problems after this miniscule change (which corrects actually a typo, nothing more). The IDE starts, seems to work, but I didn't use it for any serious programming (yet).

karakas 2006-04-08 22:27

sethjackson,

well, indeed I get a "We are sorry, but this is currently not supported in your platform" error when I click on the "Visit the Code::Blocks website" link, as well as other links that obviously need to know my "default browser".

But is this a reason to drop support for "anything less than wx 2.6.1"? Just say that "the links will not work" and let people use it, even if they happen to have a somewhat older environment. Don't force everybody to be on the bleeding edge.

ID_24639 2006-04-09 00:07

There are more than one reason(s) for dropping support for anything besides wx 2.6.1 or higher. wx Bugs, wxFNB (needs the wx 2.6 series AFAIK), and possibly wxScintilla needing wx 2.6.x or higher (not sure about wxScintilla). Anyways no one is going to force you to do anything. Feel free to use whatever wx version you want. As of right now the only supported way of compiling C::B is with wx 2.6.2 and GCC. Oh and BTW wxU(S)sleep is depreciated anyways. ;)

http://www.wxwidgets.org/manuals/2.6.2/wx_timefunctions.html#wxusleep

So we need to use wx/Milli/Micro/Sleep instead.

mandrav 2006-04-10 08:46

First of all, you didn't tell us which version of C::B you 're referring to.

Judging from the dates in your diff, I 'd say rc2. For rc2, yes, this is the only needed change to build it.

But for the HEAD version, you do need wx2.6+. Many things have changed/improved sice rc2 and wx2.6+ is a must now.

> Don't force everybody to be on the bleeding edge.

Uh? Current stable wx version is wx2.6.3 already. It's not bleeding edge.

wx2.7 is bleeding edge and nobody asked you to use this...