help-gplusplus
[Top][All Lists]
Advanced

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

Re: c++ cross compiling for 32 bit


From: Paul Pluzhnikov
Subject: Re: c++ cross compiling for 32 bit
Date: Thu, 08 Mar 2007 18:59:19 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Robert Heller <heller@deepsoft.com> writes:

>> I'm trying to find the right cc and linker flags to generate a 32-bit
>> version of my program.

The correct command is 'g++ -m32 hello.cpp -o hello'

You should *always* use correct compiler driver -- 'g++' for C++,
'gcc' for C. Contrary to popular belief they are not the same thing.

> By default, most (all?) of the 64-bit x86 Linux distros only include
> the 64-bit development packages.

The exact opposite is true for all distributions I know of.
The OP clearly *has* 32-bit development package; if he didn't the
error would have been something like: "ld: can't find -lc library".

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]