Mailing List Archive



Back to the month index Back to the list index

elliston (elliston@sound.net)
Tue, 1 Apr 1997 09:05:23 -0600 (CST)


From: elliston <elliston@sound.net>
Message-Id: <199704011505.JAA29360@sound.net>
Subject: Re: [mSQL] can't compile simple program
Date: Tue, 1 Apr 1997 09:05:23 -0600 (CST)

I saw this simple c program and decided to try using the c api.

>
> 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);
> }

I modified this program by deleting the "include/" and tried to compile
using the example cmd from the FAQ. I got the following error:
gcc: I/home/soundnet/elliston/Hughes/include: No such file or directory using
the command:
 gcc I/home/soundnet/elliston/Hughes/include msqltst.c

I then copied the file the file to the include directory and tried to
recompile.

 ~/Hughes/include> gcc msqltst.c
In file included from msqltst.c:4:
msql.h:116: warning: parameter names (without types) in function declaration
msql.h:117: warning: parameter names (without types) in function declaration
msql.h:130: parse error before `msqlDateToUnixTime'
msql.h:130: warning: data definition has no type or storage class
msql.h:131: parse error before `msqlTimeToUnixTime'
msql.h:131: warning: data definition has no type or storage class

If I comment out lines 130 and 131 in msql.h the program compiles with warnings.

I can then link and run the program.

Could someone explain why I get this error?

This is installed on my personal account at my ISP:

Version Details :-

        msqladmin version 2.0 Beta 5 Pre2
        mSQL server version 2.0 Beta 5 Pre2
        mSQL protocol version 22
        mSQL connection Localhost via UNIX socket
        Target platform Solaris-2.5-Sparc

Configuration Details :-

        Default config file /home/soundnet/elliston/Hughes/msql.conf
        TCP socket 1117
        UNIX socket /home/soundnet/elliston/Hughes/msql2.sock
        mSQL user elliston
        Admin user elliston
        Install directory /home/soundnet/elliston/Hughes
        PID file location /home/soundnet/elliston/Hughes/msql2d.pid

Thanks,
Jack Elliston
elliston@sound.net
--------------------------------------------------------------------------
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!