I'm new to cross platform development so I'm unsure how to go about developing simultaneously for Windows and Linux.
I was thinking of having Linux Mint running in a virtual machine and having the code in a shared directory that's available to the virtual machine. I was then going to build the Windows version of the application in Code::Blocks on the physical Windows machine, and have another installation of Code::Blocks on the virtual machine for building the Linux version. However, that seems a bit messy and I'm sure there must be a better way.
Apologies for my ignorance, but could somebody tell me the best way to go about developing for Windows and Linux simultaneously?
Best Cross Platform Build Approach?
- tierra
- Site Admin
- Posts: 1355
- Joined: Sun Aug 29, 2004 7:14 pm
- Location: Salt Lake City, Utah, USA
- Contact:
Re: Best Cross Platform Build Approach?
If you only have one computer, consider setting it up to dual-boot both Windows and Linux, and just use your VCS (i.e. git) to sync up your code. You'll want the extra CPU power necessary for compiling the code that you lose while compiling code inside of a virtual machine.
-
- Earned some good credits
- Posts: 138
- Joined: Tue May 20, 2008 1:03 pm
Re: Best Cross Platform Build Approach?
Thanks a lot for the replies. Dual booting would be a bit of a hassle and my Linux desktop only has a low power Atom processor so would probably be very slow for compilation. I'll give it a try in a virtual machine and see how slow compilation is.
I'm not familiar with cmake but I'll have a read about it now.
Thanks again for the advice.
I'm not familiar with cmake but I'll have a read about it now.
Thanks again for the advice.
- tierra
- Site Admin
- Posts: 1355
- Joined: Sun Aug 29, 2004 7:14 pm
- Location: Salt Lake City, Utah, USA
- Contact:
Re: Best Cross Platform Build Approach?
Atom CPU and virtualization? Ouch. Don't even bother with a virtual machine, your only option is to just dual boot. Using something like VirtualBox on an Atom CPU could easily take half a day just to compile wxWidgets. Even using VirtualBox / VMWare / or some other kind of virtual machine other than maybe KVM for development on a wxWidgets application is usually only a reasonable option for someone with at least a quad-core 2Ghz+ CPU with hardware virtualization support. Unless you have one of the newest Avoton Atom CPUs (which is highly unlikely), you're running a max of two cores at a max of 2Ghz at low power without hardware virtualization support (Intel VT-x). You should really just consider getting a new computer.
Re: Best Cross Platform Build Approach?
I use cross-compilation using the x86-mingw packages. I have a rather nasty bash script that pulls in all my dependencies and cross-compiles them. This has the advantage that upstream debian/mint/ubuntu maintainers patch most things that need patching. The downside is there are some hard-to-debug issues with cross-compilation.
That said, I’ve found the automatability, and auto-updates (simply apt-get the source again) to be a better solution than using tdm-gcc. The source for my compilation is available (https://sourceforge.net/p/threedepict/c ... ian-cross/ ), but there be dragons. Switching between 32 and 64 is usually quite simple.
That said, I’ve found the automatability, and auto-updates (simply apt-get the source again) to be a better solution than using tdm-gcc. The source for my compilation is available (https://sourceforge.net/p/threedepict/c ... ian-cross/ ), but there be dragons. Switching between 32 and 64 is usually quite simple.