views:

40

answers:

1

I tried to port some code onto Mac OS X.

The program uses the "ttmath" library, a header big-num header library. This library works fine on both windows and linux, but when I try to compile and run it on a Mac, the following error message always shows up :

"can't find a register in class 'BREG' while reloading 'asm'".

I found some documents say that this problem is due to the old version of GCC compiler (build 5488), but this message still shows up after I updated GCC.

currently my GCC version is :

i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)

and the OS is: Mac OS X version 10.5.8

I can't find any useful information about how to solve this problem, is there anyone can help me? Thanks a lot!

A: 

Thanks for DeadMG! This problem is due to the PIC-safe option.

I added "-mdynamic-no-pic" and "-fno-pic" when I compile the code, and it works fine now :)

Claire Huang