gcc cross compiling

Jonathan Wakely jwakely.gcc@gmail.com
Sat Aug 13 19:14:00 GMT 2011


On 13 August 2011 19:13, rudy_b wrote:
>
> Hi,
> I would really appreciate some help.
> I have a VERY simple C++ program, it is probably not even more than 30 lines
> of code, and all it is doing it is mostly dealing with File IO's. I will be
> honest, and the only library that I included is something called
> boost::filesystem, but I did search and found out that the "boost" library
> should run on all platforms. Granted that if this is true, is there a simple
> way for me to cross platforms.
> As I said, I don't have anything fancy, it is just simple c++ code, with
> opening files, and reading files, and maybe renaming some files, and that is
> about it. It is a command line C++ code, and doesn't involve any fancy
> GUI's.
> I developed this C++ code on a linux machine, with the following version
> info:
> Linux 2.6.18-164.el5 x86_64
> And, I have access to most of gcc versions (4.3.5, 4.4.0, 4.5.1, 4.5.2,
> 4.6.0)
>
> And, all I want to do is to bring this code over to my classic Mac:
> Mac OS leopard 10.6
>
> I tried to read more about this, and I came across the following link:
> http://www.sandroid.org/imcross/
>
> This looks very complicated, and just to do that it will take me days, to
> get it going, and plus I would need a huge storage place on my disk to
> install all these packages.
>
> I am really hoping there should be a way to bring my simple code over from
> Linux to Mac, without going through all these massive steps listed above.
>
> my c++ code, has only one function() and then the main().
> My guess would be that there should be way simpler method of doing this,
> since my  code is fairly simple.
>
> I really appreciate some help.

Just install a compiler on your Mac, then compile the code on the Mac.



More information about the Gcc-help mailing list