Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Solaris Linker

Help
saber850
2004-09-22
2013-04-24
  • saber850
    saber850
    2004-09-22

    I'm using GCC on Solaris, but Sun's default linker (ld).  Which name should I use for the linker?  I tried gcc, but that fails when I try to create a shared lib w/ a static runtime:

    ...
    Starting link
    gcc -g -static -shared -o libInet.so obj\Session.o -lm \usr\local\gcc-3.4.2\lib\gcc\sparc-sun-solaris2.7\3.4.2\..\..\..\libstdc++.a
    ld: warning: option -d appears more than once, first setting taken
    ld: fatal: option -dn and -z[text|textwarn|textoff] are incompatible
    ld: fatal: option -dn and -G are incompatible
    ld: fatal: Flags processing errors
    collect2: ld returned 1 exit status
    : error: BUILD FAILED

    I also tried sunc89 and sparc-sun-solaris2-ld, but they each had problems in different areas (either in generating a static lib, or a shared obj).  I can provide error messages if necessary.

    ld -V yields:
       ld: Software Generation Utilities - Solaris Link Editors: 5.7-1.282

    Any suggestions on which name I should use?