Hi ,
I want to write a sybase program client program that send query to sybase database and come with results
<pre lang="xml">
#include <sybfront.h>
#include <iostream>
#include <sybdb.h>
#include <syberror.h>
int main()
{
DBPROCESS *dbproc;
LOGINREC *login;
DBCHAR name[40];
DBCHAR city[20];
RETCODE return_code;
dbinit();
login = dblogin();
DBSETLPWD(login, "server_password");
DBSETLAPP(login, "example");
dbproc = dbopen(login, NULL);
dbcmd(dbproc, "select au_lname, city from pubs2..authors");
dbcmd(dbproc, " where state = ?CA? ");
dbsqlexec(dbproc);
while ((return_code = dbresults(dbproc)) !=NO_MORE_RESULTS )
{
if (return_code == SUCCEED)
{
dbbind(dbproc, 1, STRINGBIND, (DBINT)0, (unsigned char*)name);
dbbind(dbproc, 2, STRINGBIND, (DBINT)0, (unsigned char*)city);
while (dbnextrow(dbproc) != NO_MORE_ROWS)
{
printf ("%s: %s\n", name, city);
}
}
}
dbexit();
return 0;
}
Here I am getting the below error:
Undefined first referenced
symbol in file
dbcmd client.o
dbnextrow client.o
dbbind client.o
dbexit client.o
dbinit client.o
dbopen client.o
dbresults client.o
dbsqlexec client.o
dblogin client.o
dbsetlname client.o
ld: fatal: Symbol referencing errors. No output written to a.out
Can anyone tell how to remove this error