create Universal Static Library on Mac

Help
Rashi
2007-04-10
2013-04-24
  • Rashi
    Rashi
    2007-04-10

    I tried to create Universal Static Libary on Mac but when i specify

    <linker name="gcc"
    ...
    <linkerarg value="-arch i386" />
    </linker>

    the following error occur by ant

    [cc] 0 total files to be compiled.
    [cc] Starting link
    [cc] ar: illegal option -- h
    [cc] usage:  ar -d [-TLsv] archive file ...
    [cc]     ar -m [-TLsv] archive file ...
    [cc]     ar -m [-abiTLsv] position archive file ...
    [cc]     ar -p [-TLsv] archive [file ...]
    [cc]     ar -q [-cTLsv] archive file ...
    [cc]     ar -r [-cuTLsv] archive file ...
    [cc]     ar -r [-abciuTLsv] position archive file ...
    [cc]     ar -t [-TLsv] archive [file ...]
    [cc]     ar -x [-ouTLsv] archive [file ...]

    Build Failed

    To link the object files, cc tasks is using "ar" but not "gcc" and that is why it is giving errors for "ar"

    Can anyone guide me how can i create universal Binary on MAc through cc tasks