Mailing List Archive



Back to the month index Back to the list index

Henry Minsky (hqm@ua.com)
Tue, 3 Sep 1996 15:42:31 -0700


Date: Tue, 3 Sep 1996 15:42:31 -0700
From: Henry Minsky <hqm@ua.com>
Message-Id: <199609032242.PAA00237@merlin.datawave.net>
Subject: Re: [mSQL] C API and linking

>Very simple -- you need to put your libraries AFTER the object file which
>references it.
>
>Try
> gcc test.c -I/usr/local/Minerva/include -L/usr/local/Minerva/lib -lmsql
>

      This seemed to work. GCC no longer complains about the the mSQL library
   not being there. However, it does look like there is something in the msql
   library that is not being referenced properly.

   gcc test.c -I/usr/local/Minerva/include -L/usr/local/Minerva/lib -lmsql
   Undefined first referenced
    symbol in file
   socket /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   gethostbyname /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   setsockopt /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   getservbyname /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   ntohs /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   inet_addr /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   shutdown /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   htons /usr/local/Minerva/lib/libmsql.a(libmsql.o)
   connect /usr/local/Minerva/lib/libmsql.a(libmsql.o)

Oh, yeah, Solaris. Try adding " -lsocket -lnsl"

Sun decided that the Berkeley sockets interface was sufficiently
"non-standard" that they put it in its own library.

--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!