Hi,

I'm trying to compile and link a small program on Win98 with borland's
free C compiler (version 5.5.1)
Here is the code:

(test.c)

#include <winsock.h>
#include <windows.h>
#include <mysql.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
MYSQL *mysql;

mysql = malloc(sizeof(MYSQL));

mysql_init(mysql);

printf("Initalization Done!!\n");

free(mysql);
return 0;
}

On the dos prompt I type :bcc32 test.c -lm -lmysqlclient -o and I get an

unresolved external reference for the call to
mysql_init during the link phase.  The compile is clean.

I've also tried the following comand line input with the same outcome:
bcc32 test.c -o -lm -lmysqlclient
bcc32 test.c -lmysqlclient -o
bcc32 test.c -lm -lmysqlclient -lz -o
bcc32 test.c -lm -L\Borland\bcc55\lib -lmysqlclient -o    /* i thought
this would work but it didn't */

The compiler has been set up correctly with bcc32.cfg and ilink.cfg
files.  I have also put the -L command in the statement and that didn't
work either as you can see.  All directories and settings have been
double and triple checked to be corectly set.

I downloaded mysql version 3.23 for windows about the end of November
2001.  I've installed it and have had the server running, viewing
database tables and so on.

So I'm trying to write code to interact with the DB.

What am I doing wrong??






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to