On Mar 8, 10:59 pm, Paul Pluzhnikov <[EMAIL PROTECTED]> wrote: > Robert Heller <[EMAIL PROTECTED]> 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.
Thanks for the responses. I did find after posting my question that I was using the wrong linker, switching to g++ helped. But I did have to move some files from /usr/lib64/gcc/x86_64-suse-linux/4.0.2/32 one level up. And also copy crt?.o from /usr/lib to /usr/lib64 to get my file to link correctly. Even with the "-m32" flag, the system kept looking in the "64" directories for libraries and the "crt?.o" files. The better thing to do seems to be to set up different boot environments. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus