[SunHELP] Basic port programming

Dale Ghent daleg at elemental.org
Wed May 15 13:47:38 CDT 2002


On Wed, 15 May 2002, Anthony J. Gabrielson wrote:

| Thanks for the help - that fixed 2 of the problems.  I went looking
| through the man page to see where you saw that, and I just didn't see
| it.  I'm down to one error - do you know what I need to link against for
| this error:
|
| gcc -Xlinker /usr/lib/libsocket.so /usr/lib/libnsl.so getip.c
| Undefined                       first referenced
|  symbol                             in file
| herror                              /var/tmp/ccJtpzXZ.o
| ld: fatal: Symbol referencing errors. No output written to a.out
| collect2: ld returned 1 exit status

Add libresolv. herror man page tells you that, too.

| Also is there a way to automate this.  Linux doesn't make me spec out the
| link like this and I would prefer it if solaris was like that as well.


In linux, most everything you need is contained within libc, which is
automatically linked against in any C program compile.

Solaris is a bit more spread out than that. Not mecesarily a bad thing.
You just need to be aware of what additional libraries you need to link
in, is all.

/dale



More information about the SunHELP mailing list