News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

The 26 August 2008 build (5195) is out.

Started by killerbot, August 26, 2008, 08:54:26 PM

Previous topic - Next topic

Grom

gcc+winXP+suse.

killerbot


stahta01

Quote from: killerbot on September 19, 2008, 05:05:01 PM
coming this weekend :-)

killerbot: Can you apply this simple patch below?
It is a small part of my patches to get Code::Blocks working when linked against wxWidgets 2.9
As posted in this thread.
http://forums.next.codeblocks.org/index.php/topic,9210.msg65823.html#msg65823

The wxWidgets 2.9 has wxBitmapType as an enum instead of int.
And, wxColour::Ok was removed, since wxColour::IsOk was in wxWidgets 2.8


Index: src/sdk/scripting/bindings/sc_wxtypes.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_wxtypes.cpp (revision 5206)
+++ src/sdk/scripting/bindings/sc_wxtypes.cpp (working copy)
@@ -276,7 +276,7 @@
                 func(&wxColour::Blue, "Blue").
                 func(&wxColour::Green, "Green").
                 func(&wxColour::Red, "Red").
-                func(&wxColour::Ok, "Ok").
+                func(&wxColour::IsOk, "IsOk").
                 func<WXC_SET>(&wxColour::Set, "Set");
     }
};
Index: src/sdk/globals.cpp
===================================================================
--- src/sdk/globals.cpp (revision 5206)
+++ src/sdk/globals.cpp (working copy)
@@ -711,7 +711,7 @@
}
#endif

-wxBitmap cbLoadBitmap(const wxString& filename, int bitmapType)
+wxBitmap cbLoadBitmap(const wxString& filename, wxBitmapType bitmapType)
{
     // cache this, can't change while we 're running :)
     static bool oldCommonControls = !UsesCommonControls6();
Index: src/include/globals.h
===================================================================
--- src/include/globals.h (revision 5206)
+++ src/include/globals.h (working copy)
@@ -194,7 +194,7 @@
   * Always use this to load bitmaps because it takes care of various
   * issues with pre-XP windows (actually common controls < 6.00).
   */
-extern DLLIMPORT wxBitmap cbLoadBitmap(const wxString& filename, int bitmapType = wxBITMAP_TYPE_PNG);
+extern DLLIMPORT wxBitmap cbLoadBitmap(const wxString& filename, wxBitmapType bitmapType = wxBITMAP_TYPE_PNG);

// compatibility function
inline wxBitmap LoadPNGWindows2000Hack(const wxString& filename){ return cbLoadBitmap(filename); }
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

killerbot


stahta01

Quote from: killerbot on September 20, 2008, 08:54:23 AM
will do that later today

Thanks, I spent many hours looking the the cause of the script module error of "wxColour::Ok"

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

killerbot


stahta01

#36
I decided I needed to verify Code::Blocks builds using ANSI instead of Unicode wxWidgets 2.9.

Before any of my patches and compiling with wx 2.8 branch, I get about 30 warnings on printf type format strings.

Here's an example patch needed by Code::Blocks, to get rid of the warnings.
The rest are all debuggergdb plugin or contrib plugins.

Tim S


Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp (revision 5208)
+++ src/sdk/compiler.cpp (working copy)
@@ -597,7 +597,7 @@
m_Commands[i].push_back(CompilerTool());
CompilerTool& tool = m_Commands[i][index];

- wxString key = wxString::Format(_T("%s/macros/%s/tool%d/"), tmp.c_str(), CommandTypeDescriptions[i].c_str(), index);
+ wxString key = wxString::Format(_T("%s/macros/%s/tool%lu/"), tmp.c_str(), CommandTypeDescriptions[i].c_str(), index);
tool.command = cfg->Read(key + _T("command"));
tool.extensions = cfg->ReadArrayString(key + _T("extensions"));
tool.generatedFiles = cfg->ReadArrayString(key + _T("generatedFiles"));
@@ -649,7 +649,7 @@
         // read everything and either assign it to an existing regex
         // if the index exists, or add a new regex

-        group.Printf(_T("%s/regex/re%3.3d"), tmp.c_str(), index);
+        group.Printf(_T("%s/regex/re%3.3ld"), tmp.c_str(), index);
         if (!cfg->Exists(group+_T("/description")))
             continue;

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

killerbot

Quote from: stahta01 on September 21, 2008, 08:10:53 PM
I decided I needed to verify Code::Blocks builds using ANSI instead of Unicode wxWidgets 2.9.

Before any of my patches and compiling with wx 2.8 branch, I get about 30 warnings on printf type format strings.

Here's an example patch needed by Code::Blocks, to get rid of the warnings.
The rest are all debuggergdb plugin or contrib plugins.

Tim S


Index: src/sdk/compiler.cpp
===================================================================
--- src/sdk/compiler.cpp (revision 5208)
+++ src/sdk/compiler.cpp (working copy)
@@ -597,7 +597,7 @@
m_Commands[i].push_back(CompilerTool());
CompilerTool& tool = m_Commands[i][index];

- wxString key = wxString::Format(_T("%s/macros/%s/tool%d/"), tmp.c_str(), CommandTypeDescriptions[i].c_str(), index);
+ wxString key = wxString::Format(_T("%s/macros/%s/tool%lu/"), tmp.c_str(), CommandTypeDescriptions[i].c_str(), index);
tool.command = cfg->Read(key + _T("command"));
tool.extensions = cfg->ReadArrayString(key + _T("extensions"));
tool.generatedFiles = cfg->ReadArrayString(key + _T("generatedFiles"));
@@ -649,7 +649,7 @@
         // read everything and either assign it to an existing regex
         // if the index exists, or add a new regex

-        group.Printf(_T("%s/regex/re%3.3d"), tmp.c_str(), index);
+        group.Printf(_T("%s/regex/re%3.3ld"), tmp.c_str(), index);
         if (!cfg->Exists(group+_T("/description")))
             continue;


checked, agreed, applied :-)

stahta01

Quote from: killerbot on September 21, 2008, 10:18:06 PM
checked, agreed, applied :-)

Thanks, posted debuggergdb ones in new NB thread.

Tim S
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]