[root@licheng ~]# gcc -lsqlora8 test.c -o test
test.c:1:10: #include expects "FILENAME" or <FILENAME>
test.c:2:10: #include expects "FILENAME" or <FILENAME>
In file included from test.c:3:
/usr/local/include/sqlora.h:65:31: libsqlora8-config.h: No such file or directory
test.c: In function `main':
test.c:13: `EXIT_FAILURE' undeclared (first use in this function)
test.c:13: (Each undeclared identifier is reported only once
test.c:13: for each function it appears in.)
请教牛人这是怎么回事?
test.c内容如下:
#include 
#include 
#include "sqlora.h"
static CONST char * _defuser="hr/hr@mydata";
int main(int argc,char **argv)
{
sqlo_db_handle_t dbh;
CONST char * cstr = _defuser;
char server_version[100];
if (SQLO_SUCCESS!= sqlo_init(SQLO_OFF,1,100))
{
printf("Failed to init libsqlora8\n");
return EXIT_FAILURE;
}
if (SQLO_SUCCESS != sqlo_connect(&dbh,cstr))
{
printf("Cannot login with %s \n",cstr);
return EXIT_FAILURE;
}
if (SQLO_SUCCESS != sqlo_server_version(dbh,server_version,sizeof(server_version)))
{
printf("Failed to get the server version: %s\n", sqlo_geterror(dbh));
return EXIT_FAILURE;
}
printf("Connected to:\n%s\n\n", server_version);
}