[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: GCC cross compiling



On Wed, Jan 16, 2002 at 11:50:37AM +0100, Raffaele Sandrini wrote:
| Hi, 
|  
| I have a genera crosscompiling quetion: 
|  
| Do i have to compile a special GCC for every source and destination platform 
| or can i specify the destination on the command line? (the manual is a bit 
| weird about that) 

I don't know, I've never done a cross-compile before.

| Do i have to compile a libc for that platform? Do i have to link staticly? 

You would compile your app, then move the binary over to the target
platform.  If the target platform has libc and a dynamic linker, you
won't have to build it yourself and link statically (I expect).

I expect, too, that you'll need the header files from the libc on the
target platform to get any compiler checks to work right.  Probably
also necessary to get struct sizes and member alignment.

| E.g: 
|  
| for a app like: 
| int main(void) { 
| 	cout  << "Hello World"; 
| 	return 0; 
| } 

This is not C.  You also forgot to #include<iostream>.

| To execute that on an ARM platform like the Nokia 9210 (Communicator) or a 
| Psion is it enough to compile that for the specific platform? 

Do they have libstdc++ on those platforms?

-D

-- 

I can do all things through Christ who strengthens me.
        Philippians 4:13



Reply to: