Patch needed when using wx3.0 without 28 compat

Discussion about CodeLite development process and patches
stahta01
CodeLite Curious
Posts: 9
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

Patch needed when using wx3.0 without 28 compat

Post by stahta01 » Thu Dec 12, 2013 7:25 am

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)
 

User avatar
eranif
CodeLite Plugin
Posts: 6122
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Thu Dec 12, 2013 9:54 am

Thanks, applied to git head

Eran
Make sure you have read the HOW TO POST thread

petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

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

Post by petah » Sat Dec 21, 2013 3:47 am

Hey no fair! I had submitted such a patch weeks ago

:)

- p
main: Debian Jessie x64 + custom wxTrunk

stahta01
CodeLite Curious
Posts: 9
Joined: Thu Dec 29, 2011 10:07 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by stahta01 » Sun Dec 29, 2013 3:00 am

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.

petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

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

Post by petah » Sun Dec 29, 2013 3:26 am

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
main: Debian Jessie x64 + custom wxTrunk

User avatar
eranif
CodeLite Plugin
Posts: 6122
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Sun Dec 29, 2013 1:02 pm

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
Make sure you have read the HOW TO POST thread

petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

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

Post by petah » Sun Dec 29, 2013 2:09 pm

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
You do not have the required permissions to view the files attached to this post.
main: Debian Jessie x64 + custom wxTrunk

User avatar
eranif
CodeLite Plugin
Posts: 6122
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Sun Dec 29, 2013 2:17 pm

Thanks, applied to git head

Eran
Make sure you have read the HOW TO POST thread

petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

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

Post by petah » Sun Dec 29, 2013 3:04 pm

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
You do not have the required permissions to view the files attached to this post.
main: Debian Jessie x64 + custom wxTrunk

User avatar
eranif
CodeLite Plugin
Posts: 6122
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

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

Post by eranif » Sun Dec 29, 2013 6:06 pm

Thanks, applied

Eran
Make sure you have read the HOW TO POST thread

Post Reply