Miracl

tblount

Registered
I am attempting to link the Miracl library (http://aoife.indigo.ie/~mscott/) to my Mac OS X c++ app. For some reason the executable will not build. The compiler is telling me that there are undefined symbols and that there is an unknown extension on the "miracl.a" file. I don't understand this because that is the same extension that is on the "libstdc++.a" file which is created automatically by Project Builder. The "miracl.a" file is created by the following two steps:
1)"cc -c mr*.c"
2) "ar rc miracl.a mr*.o".
I then link the appropriate header files, including the miracl.a file and build the project.

I am compiling on Mac OS X (5M28) and the latest Developer tools. Does anyone have an idea what is wrong here?

Regards,
Theron

Here is the compiler output:
...
/usr/bin/jam -d1 JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase JAMFILE=- build ACTION=build TARGETNAME=BigNumberTest NATIVE_ARCH=ppc BUILD_STYLE=Development CPP_HEADERMAP_FILE=/Users/tblount/BigNumberTest/build/intermediates/BigNumberTest.build/Headermaps/BigNumberTest.hmap DSTROOT=/ OBJROOT=/Users/tblount/BigNumberTest/build/intermediates SRCROOT=/Users/tblount/BigNumberTest SYMROOT=/Users/tblount/BigNumberTest/build
Warning: StandaloneExecutable: Unknown extension on miracl.a when linking with StandaloneExecutable
...updating 5 target(s)...
BuildPhase BigNumberTest
Completed phase <CopyHeaders> for BigNumberTest
BuildPhase BigNumberTest
Completed phase <DeriveAndCompileSources> for BigNumberTest
StandaloneExecutable /Users/tblount/BigNumberTest/build/BigNumberTest
/usr/bin/ld: warning prebinding disabled because of undefined symbols
/usr/bin/ld: Undefined symbols:
_absol
_add
_big_to_bytes
_bigdig
_bigrand
_bytes_to_big
_cinstr
_copy
_cotstr
_decr
_divide
_egcd
_expint
_get_mip
_incr
_lucas
_mad
_mirexit
_mirkill
_mirsys
_mirvar
_mr_alloc
_mr_free
_mr_naf_window
_mr_window
_multiply
_negate
_normalise
_nres
_nres_lucas
_nres_modadd
_nres_moddiv
_nres_modmult
_nres_modsub
_nres_negate
_nres_powmod
_nres_powmod2
_nres_powmodn
_nres_premult
_nres_sqroot
_nroot
_nxprime
_nxsafeprime
_power
_powltr
_powmod
_powmod2
_powmodn
_premult
_prepare_monty
_redc
_sftbit
_size
_sqroot
_subdiv
_subtract
_trial_division
_xgcd
_zero

/usr/bin/cc -o "/Users/tblount/BigNumberTest/build/BigNumberTest" "-L/Users/tblount/BigNumberTest/build" "-L/Users/tblount/miracl/source" "-F/Users/tblount/BigNumberTest/build/ProjectHeaders" "-F/Users/tblount/BigNumberTest/build" -filelist "/Users/tblount/BigNumberTest/build/intermediates/BigNumberTest.build/Objects/LinkFileList" "-arch" "ppc" "-prebind" "-lstdc++"

...failed StandaloneExecutable.LinkUsingFileList /Users/tblount/BigNumberTest/build/BigNumberTest ...
 
To whomever may be concerned,

The workaround is to add all of the corresponding *.c files to the Project Builder project -- problem solved.:) :)
 
Back
Top