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

CodeBlocks compiling fail

<< < (4/8) > >>

je_rem_y:
Since wxWidgets is not necessarily compiled with "--with-regex=builtin", it might be a good idea to add a condition to handle this case right ?

polylux:

--- Quote from: oBFusCATed on January 03, 2012, 05:12:23 pm ---The only thing you could do is to report a bug to the maintainers of wxGTK in Arch.
Building separate version of wxgtk is a workaround with high maintenance cost.

--- End quote ---

I agree. It's necessary to fix the issue in the repo version. I go write a bug report for that. Thanks everyone.

stahta01:
I am willing to post a patch to svn trunk that fixes part of this problem.
But, it will not be perfect.

Edit: It will require testing on your part.

Does anyone wish me to do so?

Tim S.

Patch of first location needed; more locations are still needed to be patched.


--- Code: ---Index: src/sdk/macrosmanager.cpp
===================================================================
--- src/sdk/macrosmanager.cpp (revision 7657)
+++ src/sdk/macrosmanager.cpp (working copy)
@@ -86,7 +86,7 @@
     m_RE_IfSp.Compile(_T("[^=!<>]+|(([^=!<>]+)[ ]*(=|==|!=|>|<|>=|<=)[ ]*([^=!<>]+))"), wxRE_EXTENDED | wxRE_NEWLINE);
     m_RE_Script.Compile(_T("(\\[\\[(.*)\\]\\])"), wxRE_EXTENDED | wxRE_NEWLINE);
     m_RE_ToAbsolutePath.Compile(_T("\\$TO_ABSOLUTE_PATH{([^}]*)}"),
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && defined(wxHAS_REGEX_ADVANCED)
                                 wxRE_ADVANCED);
 #else
                                 wxRE_EXTENDED);

--- End code ---

oBFusCATed:
It is not that simple, you should verify that the expressions still work. Probably with the wxregexp testbed plugin.

stahta01:
Patch that needs tested. Note: It is not worth my time to test it.
The users under Linux with the problem needs to test it.
After, they test it please think about submitting it as a patch to the proper Code::Blocks site.

EDIT2: Possible flaw of patch the defining of wxHAS_REGEX_ADVANCED; I can not find it under windows.
EDIT3: Found it. Wrote a simple wx Program to confirm it is defined for windows wx Build.


--- Code: ---Index: src/sdk/macrosmanager.cpp
===================================================================
--- src/sdk/macrosmanager.cpp (revision 7657)
+++ src/sdk/macrosmanager.cpp (working copy)
@@ -86,19 +86,19 @@
     m_RE_IfSp.Compile(_T("[^=!<>]+|(([^=!<>]+)[ ]*(=|==|!=|>|<|>=|<=)[ ]*([^=!<>]+))"), wxRE_EXTENDED | wxRE_NEWLINE);
     m_RE_Script.Compile(_T("(\\[\\[(.*)\\]\\])"), wxRE_EXTENDED | wxRE_NEWLINE);
     m_RE_ToAbsolutePath.Compile(_T("\\$TO_ABSOLUTE_PATH{([^}]*)}"),
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && defined(wxHAS_REGEX_ADVANCED)
                                 wxRE_ADVANCED);
 #else
                                 wxRE_EXTENDED);
 #endif
     m_RE_To83Path.Compile(_T("\\$TO_83_PATH{([^}]*)}"),
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && defined(wxHAS_REGEX_ADVANCED)
                                 wxRE_ADVANCED);
 #else
                                 wxRE_EXTENDED);
 #endif
     m_RE_RemoveQuotes.Compile(_T("\\$REMOVE_QUOTES{([^}]*)}"),
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && defined(wxHAS_REGEX_ADVANCED)
                                 wxRE_ADVANCED);
 #else
                                 wxRE_EXTENDED);
Index: src/plugins/contrib/ToolsPlus/PipedProcessCtrl.cpp
===================================================================
--- src/plugins/contrib/ToolsPlus/PipedProcessCtrl.cpp (revision 7657)
+++ src/plugins/contrib/ToolsPlus/PipedProcessCtrl.cpp (working copy)
@@ -206,7 +206,12 @@
 
 void PipedProcessCtrl::ParseLinks(int lineno, int lastline)
 {
-    wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
+    #ifdef wxHAS_REGEX_ADVANCED
+        wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
+    #else
+        wxRegEx re(m_linkregex,wxRE_EXTENDED|wxRE_NEWLINE);
+    #endif
+
     while(lineno<lastline)
     {
         int col=0;
@@ -305,7 +310,11 @@
     wxString text=m_textctrl->GetTextRange(start,end+1);
 
     //retrieve the file and line number parts of the link
-    wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
+    #ifdef wxHAS_REGEX_ADVANCED
+        wxRegEx re(m_linkregex,wxRE_ADVANCED|wxRE_NEWLINE);
+    #else
+        wxRegEx re(m_linkregex,wxRE_EXTENDED|wxRE_NEWLINE);
+    #endif
     wxString file;
     long line;
     if(!re.Matches(text))
Index: src/plugins/contrib/DoxyBlocks/Expressions.h
===================================================================
--- src/plugins/contrib/DoxyBlocks/Expressions.h (revision 7657)
+++ src/plugins/contrib/DoxyBlocks/Expressions.h (working copy)
@@ -84,7 +84,7 @@
     "([^)]*)?"                      // The function's parameters.
     "\\)"                           // The closing parenthesis.
     ),
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && defined(wxHAS_REGEX_ADVANCED)
     wxRE_ADVANCED);
 #else
     wxRE_EXTENDED);
@@ -104,7 +104,7 @@
     "([^)]*)?"                      // The function's parameters.
     "\\)"                           // The closing parenthesis.
     ),
-#ifndef __WXMAC__
+#if !defined(__WXMAC__) && defined(wxHAS_REGEX_ADVANCED)
     wxRE_ADVANCED);
 #else
     wxRE_EXTENDED);

--- End code ---

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version