Hi guys,
I have made some basic board games in C++ like Tic-Tac-Toe, Hangman and a few others.
I want to share those with my friends who do not have a C++ compiler.
All my projects are console applications in either VisualStudio or Netbeans. And they want to run it on Mac/Linux environment.
I was thinking about sending the .exe file but it won't run on Mac/Linux.
Run up a virtual machine (using VirtualBox, for example), install Linux on it, build your code on it and send them the resulting executable.
Alternatively, you could look into "cross compiling", but that's such a pain that the easier solution really is to just have a virtual machine with the OS of your choice on it.
You might be surprised how easy it is to create a new virtual machine. Alternatively, there are even existing virtual machines. You install virtuabox, then just download and run the new VM. It's really pretty simple.
By comparison with that option, setting up cross-compiling to make Linux executables on your windows machine would actually be of comparable complexity.
@Moschops,
Hey, thanks. I installed the virtual machine and linux (ubuntu) is running perfectly inside the virtualbox.
Now, how do I compile C++ programs in that and generate linux executables. I don't see visual studio or netbeans in it.