Page 1 of 2

Patch needed when using wx3.0 without 28 compat

Posted: Thu Dec 12, 2013 7:25 am
by stahta01
This next code is from wx/string.h

Code: Select all

#if WXWIN_COMPATIBILITY_2_8
    // lot of code out there doesn't explicitly include wx/crt.h, but uses
    // CRT wrappers that are now declared in wx/wxcrt.h and wx/wxcrtvararg.h,
    // so let's include this header now that wxString is defined and it's safe
    // to do it:
    #include "wx/crt.h"
#endif
I am testing wxWidgets SVN Branch building CodeLite against it.
I needed the following patch to avoid errors related to undefined wxPrintf and related functions.

Tim S.

Code: Select all

diff --git a/codelite_launcher/codelite_launcher.cpp b/codelite_launcher/codelite_launcher.cpp
index 64f229a..acb9651 100644
--- a/codelite_launcher/codelite_launcher.cpp
+++ b/codelite_launcher/codelite_launcher.cpp
@@ -1,6 +1,7 @@
 #include <wx/string.h>
 #include <wx/process.h>
 #include <wx/cmdline.h>
+#include <wx/crt.h>
 
 const wxCmdLineEntryDesc gCmdLineDesc[] = {
 	{ wxCMD_LINE_OPTION, "n",   "name", "Executable to launch", wxCMD_LINE_VAL_STRING },
diff --git a/codelite_make/cl_make_generator_app.cpp b/codelite_make/cl_make_generator_app.cpp
index 299b374..a6418cc 100644
--- a/codelite_make/cl_make_generator_app.cpp
+++ b/codelite_make/cl_make_generator_app.cpp
@@ -4,6 +4,7 @@
 #include <builder_gnumake.h>
 #include <configuration_mapping.h>
 #include <macromanager.h>
+#include <wx/crt.h>
 
 IMPLEMENT_APP_CONSOLE(clMakeGeneratorApp)
 

Re: Patch needed when using wx3.0 without 28 compat

Posted: Thu Dec 12, 2013 9:54 am
by eranif
Thanks, applied to git head

Eran

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sat Dec 21, 2013 3:47 am
by petah
Hey no fair! I had submitted such a patch weeks ago

:)

- p

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 3:00 am
by stahta01
petah wrote:Hey no fair! I had submitted such a patch weeks ago

:)

- p
I noticed our patches differed; did my patch fix the issue for you?

Link to your patch thread http://forums.codelite.org/viewtopic.ph ... 9966#p9966

FYI: I have found that for short patches like this one using codetags results in them getting applied more often on other sites.

Tim S.

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 3:26 am
by petah
It fixed my problem at the time, but I haven't been able to build the latest CodeLite since Eran added SFTP because my job prevents me from embedding security-related code like libssh-dev and there's apparently no -DENABLE=0 build option for it. I haven't had time to look into it further and didn't want to both Eran about it.

cheers,

-- p

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 1:02 pm
by eranif
petah wrote:t fixed my problem at the time, but I haven't been able to build the latest CodeLite since Eran added SFTP because my job prevents me from embedding security-related code like libssh-dev and there's apparently no -DENABLE=0 build option for it. I haven't had time to look into it further and didn't want to both Eran about it.
I have added a new -DENABLE_SFTP=0|1 paramater to codeilte's cmake execution line (the default is with SFTP enabled)
This drops the needs for libssh-dev. Obviously, it will also build codelite without the SFTP plugin + all the SFTP classes which are part of libcodelite.so and libplugin_sdk.so

Eran

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 2:09 pm
by petah
eranif wrote:I have added a new -DENABLE_SFTP=0|1
Wow that was fast, thx!

I attached a patch for the above-mentioned --disable-compat28 wxWidgets build flag.

thx again & cheers,

-- p

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 2:17 pm
by eranif
Thanks, applied to git head

Eran

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 3:04 pm
by petah
I did a new build with gcc 4.8.1 and -DGTK_USE_NATIVEBOOK=1 (previous was with gcc 4.7 and default -DGTK_USE_NATIVEBOOK=0) and required the attached patch. I'm guessing it's due to the gtk notebook flag.

thx & cheers,

-- p

Re: Patch needed when using wx3.0 without 28 compat

Posted: Sun Dec 29, 2013 6:06 pm
by eranif
Thanks, applied

Eran