Mailing List Archive



Back to the month index Back to the list index

Duc M Do (duc@bikini.cim.com.au)
Wed, 2 Apr 1997 09:29:01 +1000 (EST)


From: Duc M Do <duc@bikini.cim.com.au>
Message-Id: <199704012329.JAA04403@bikini.cim.com.au>
Subject: Re: [mSQL] can't compile simple program
Date: Wed, 2 Apr 1997 09:29:01 +1000 (EST)

>
> I am trying to compile a simple c/msql program.
> Here is the program:
>
>
> #include <stdlib.h>
> #include <stdio.h>
> #include "include/msql.h"
>
> void main () {
> int socket = 0;
> socket = msqlConnect(NULL);
> }
>
>
> msql was not installed in /usr/local/Hughes, but everything is fine.
>
>
> Version Details :-
>
> msqladmin version 2.0 Beta 4
> mSQL server version 2.0 Beta 4
> mSQL protocol version 22
> mSQL connection Localhost via UNIX socket
> Target platform Solaris-2.5.1-i86pc
>
> Here is what happens when I try to compile:
>
> gcc -lmsql msqltest.c
> ld: fatal: library -lmsql: not found
> ld: fatal: File processing errors. No output written to a.out
>
>
> What am I doing wrong??
>
> Please let me know if more information is needed.
>
> Thanks in advance.
>
> Harry Mitchell

mSQL comes with a bunch of libraries (normally under /usr/local/Hughes/lib after default installation). Your gcc does not find libmsql.a

You need to include the msql lib dir into sys LIBPATH as well.

Hope that helps.

-- Duc M. Do (duc@cim.com.au)

+----------------------------------------------------------------+
| _/_/_/ _/ _/ _/ Total Internet Solutions Providers |
| _/ _/ _/_/_/_/ http://www.cim.com.au - info@cim.com.au |
| _/ _/ _/ _/ _/ Phone: +61 3 9421-2199 |
| _/_/_/ _/ _/ _/ Fax : +61 3 9421-2012 |
| Commercial Interactive Media (CIM) - The Java Experts |
+----------------------------------------------------------------+
--------------------------------------------------------------------------
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!