0
votes

I'm trying to link two nasm 32 bit objects on a 64 bit intel Mac(Lion).

Used gcc -m32 and it is not working. I think It might be because I do not have the libraries installed. gcc-multilib. Do not know how to install them on Mac.

My gcc version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

I just want it to work. Any suggestions would be useful, thanks!

1
I add how I compile the asm: nasm -f elf xxxx.asmProject Dumbo Dev
NASM version 0.98.40 (Apple Computer, Inc. build 11) compiled on Aug 11 2011Project Dumbo Dev

1 Answers

0
votes

On OS X, you don't use the -m switch. Instead, you use -arch. In this case: -arch i386.