Back to the month index |
Back to the list index
|
Ralph E. Walden, Jr. (rwalden@accessus.net)
Wed, 02 Apr 1997 09:50:00 -0600
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Frank D. Cringle: "Re: [mSQL] !! Error in Solaris's libc !!"
- Previous message: Aaron Abelard: "Re: [mSQL] escaping characters in c"
- In reply to: David Sklar: "[mSQL] escaping characters in c"
Message-Id: <33428028.4C07@accessus.net> Date: Wed, 02 Apr 1997 09:50:00 -0600 From: "Ralph E. Walden, Jr." <rwalden@accessus.net> Subject: Re: [mSQL] can't compile simple programelliston wrote:
>
> 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:
>
[snip]
> Thanks,
> Jack Elliston
> elliston@sound.net
I had this same problem. What happens in my case, I've discovered
is that the compiler does not recognize the time_t structure util
<time.h> is included somewhere. Add this to the top of your source
file...
#include <time.h>
...and you should not have any more problems.
Ralph Walden
rwalden@accessus.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!
- Next message: Frank D. Cringle: "Re: [mSQL] !! Error in Solaris's libc !!"
- Previous message: Aaron Abelard: "Re: [mSQL] escaping characters in c"
- In reply to: David Sklar: "[mSQL] escaping characters in c"