I am in the planning stages of a project that I would like to run on Linux (my primary usage) and Windows (most of the other users).
I have to say that Mac users would be a bonus.
Using CodeLite w/wxWidgets (I guess the wxCrafter plugin) can I build for all three targets from one build system?
Or will I need to have an install on each target system and build it natively?
I am running Debian (Wheezy) and installed from the apt repositories
Also I am primarlly a C programmer, will I lose any functionality or serious Ease Of Use features by running C instead of C++?
Thanks,
Tom
Dual Target Builds (Linux and Windows)
-
- CodeLite Curious
- Posts: 6
- Joined: Sat May 18, 2013 12:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
No. wxWidgets is "code once build everywhere"Tom wrote:can I build for all three targets from one build system?
You need to compile it for each target
I am not sure what you are asking here. But IMO, anything that can be done in C can be written in C++Tom wrote:Also I am primarlly a C programmer, will I lose any functionality or serious Ease Of Use features by running C instead of C++?
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 6
- Joined: Sat May 18, 2013 12:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
I since have discovered that wxWidgets does not have bindings for C, just C++ so my question becomes meaninglesseranif wrote:I am not sure what you are asking here. But IMO, anything that can be done in C can be written in C++Tom wrote:Also I am primarlly a C programmer, will I lose any functionality or serious Ease Of Use features by running C instead of C++?
Eran
But I am trying to do the Hello World example and it seems to be for a different version of the designer than is pictured http://codelite.org/LiteEditor/WxCrafterHelloWorld
Is the Debian apt repos version older than the 'latest'?
Are there any other tutorials that may help me learn how to use the desginer?
Call me skeptic, but I want to prove to myself that it works like it is described (code once build everywhere) I will be happy to $upport this project
Tom
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
Can you post a screenshot? note that the above screenshot was taken from Windows and using wxCrafter 1.0 ( you should be using v1.1 which is a newer version)Tom wrote:But I am trying to do the Hello World example and it seems to be for a different version of the designer
But again, a screenshot will help clarify your question
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Dual Target Builds (Linux and Windows)
Hi,
Of course you still need to write the non-gui bit of your program in C++, so that's not a complete solution for you. But there isn't a complete solution available using C/C++. Even just considering Linux, you'll still need to create separate builds for the different distros (and for different versions of each target distro), not to mention 32 and 64 bit ones. I find VirtualBox very useful for this.
Regards,
David
As Eran said, you can't do a single build of C/C++ code that will work anywhere. However, as the conversation then moved to wxCrafter, let me add that wxCrafter optionally can output XRC instead of C++, and XRC is inherently multiplatform.Using CodeLite w/wxWidgets (I guess the wxCrafter plugin) can I build for all three targets from one build system?
Of course you still need to write the non-gui bit of your program in C++, so that's not a complete solution for you. But there isn't a complete solution available using C/C++. Even just considering Linux, you'll still need to create separate builds for the different distros (and for different versions of each target distro), not to mention 32 and 64 bit ones. I find VirtualBox very useful for this.
Regards,
David
-
- CodeLite Curious
- Posts: 6
- Joined: Sat May 18, 2013 12:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
So it sounds like if I am using CodeLite w/wxCrafter then I will be able to build an executable for each type of system I can get my hands on that is supported by CodeLite.DavidGH wrote:Hi,
As Eran said, you can't do a single build of C/C++ code that will work anywhere. However, as the conversation then moved to wxCrafter, let me add that wxCrafter optionally can output XRC instead of C++, and XRC is inherently multiplatform.
Of course you still need to write the non-gui bit of your program in C++, so that's not a complete solution for you. But there isn't a complete solution available using C/C++. Even just considering Linux, you'll still need to create separate builds for the different distros (and for different versions of each target distro), not to mention 32 and 64 bit ones. I find VirtualBox very useful for this.
Well also that platform needs a wxWdigets port as well...
VirtualBox, I've seen that before but I've never had a big enough need to try it, this may be the ticket.
tom
-
- CodeLite Curious
- Posts: 6
- Joined: Sat May 18, 2013 12:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
Ok the tutorial is here http://codelite.org/LiteEditor/WxCrafterHelloWorlderanif wrote: Can you post a screenshot? note that the above screenshot was taken from Windows and using wxCrafter 1.0 ( you should be using v1.1 which is a newer version)
But again, a screenshot will help clarify your question
Eran
The first thing that slowed me down is that wxCrafter did not appear in the Workspace Tabs then I went Plugins->wxCrafter->Open abd found the wxcp file, or found (expanded groups) and opened the wxcp file
ok so far so good.
I just discovered my next error, I think I picked wxWidgets+wxCrafter instead of wxDialog based + wxCrafter
I will re-do my test following the instructions better! (I think that is why things weren't matching up for me!)
tom
You do not have the required permissions to view the files attached to this post.
-
- CodeLite Curious
- Posts: 6
- Joined: Sat May 18, 2013 12:21 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
Well I think I found why the Tab was missing...
Maybe you need a better default for this: (ie Have it checked like this:) that now I have a build problem... sounds like an installlation problem...
Maybe you need a better default for this: (ie Have it checked like this:) that now I have a build problem... sounds like an installlation problem...
You do not have the required permissions to view the files attached to this post.
-
- CodeLite Expert
- Posts: 167
- Joined: Fri Jul 22, 2011 5:32 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Dual Target Builds (Linux and Windows)
Not sure if this help or is 'worth it' but this one time I need to build OpenOCD for windows and I managed it by building a GCC Cross Compiler to target Windows, then using that under Linux to build OpenOCD for Windows. And it basically just worked. (What a man will go through to avoid Cygwin)
That said where I work we use VirtualBox all the time for exactly this reason. If the program or build system works better with Linux or Windows, we use VirtualBox to provide the OS it wants. Pretty much we use Windows native an Linux under Virtual Box. My boss uses VirtualBox and WinXP on his mac, works fine.
Also at the risk if invoking wrath. Depending on what you're doing you could also try Mono (Open Sourced C#) with Windows Forms. As a primary embedded C + hardware guy I found the C# wall easier to climb than C++. Word of caution it's common with C#/.net to link to native dll's, if you're cross platform you need to cross compile those too and make sure they work correctly.
That said where I work we use VirtualBox all the time for exactly this reason. If the program or build system works better with Linux or Windows, we use VirtualBox to provide the OS it wants. Pretty much we use Windows native an Linux under Virtual Box. My boss uses VirtualBox and WinXP on his mac, works fine.
Also at the risk if invoking wrath. Depending on what you're doing you could also try Mono (Open Sourced C#) with Windows Forms. As a primary embedded C + hardware guy I found the C# wall easier to climb than C++. Word of caution it's common with C#/.net to link to native dll's, if you're cross platform you need to cross compile those too and make sure they work correctly.