64 bites kérdések, g++

Fórumok

Sziasztok!

A g++ fordítóval kapcsolatban lenne pár kérdésem.

1. 64 bites linuxon automatikusan 64 bitre fordul le a program? Hogyan lehet beállítani a g++ fordítót, hogy valamit 32 vagy 64 bites binárissá alakítson?

2. Ha van egy programom, abból hogyan tudok .deb és .rpm csomagokat készíteni?

3. Van arra mód, hogy más operációs rendszerre fordítson? (Win, vagy Mac esetleg PDA)

Előre is köszönöm!

Hozzászólások

Öcsém, erre tényleg csak ennyit lehet mondani: RTFM vagy STFW....

1. man gcc , különös tekintettel a "-m32" és a "-m64" opciókra
2. man rpm
3. google: "gcc cross compiling" és az első link...

így jobb?

http://en.wikipedia.org/wiki/Cross_compiler

érdekesebb idézetek az oldalról:

GCC requires that a compiled copy of binutils be available for each targeted platform. Especially important is the GNU Assembler. Therefore, binutils first has to be compiled correctly with the switch --target=some-target sent to the configure script. GCC also has to be configured with the same --target option. GCC can then be run normally provided that the tools, which binutils creates, are available in the path, which can be done using the following (on UNIX-like operating systems with bash):

Köszi!

Igazából Arch linuxom van. Egy SDL-t használó alkalmazást kell írnom, ami 32 bites, elérhető debianon, fedorán, susén és windowson is. A rendszerem 64 bites... Ezért nem tudom, hogy a lefordított kód 32 bites-e...
Azt pedig csak remélem, hogy nem kell feltennem egy debiant és egy fedorát is a deb és rpm legyártásához...