Inside of cygwin I ran
 gcc sample.c -o
sample.exe -I/usr/include/mysql/ -L/lib/mysql -lmysqlclient -lmySQL -lz -lm

I confirmed libmysql.dll is in mysql/bin with "everyone" access full control
against these files, also that username and password to db are right, but I
am guessing there is another file with bad permissions. mysql\bin is in
path.

Exception: STATUS_ACCESS_VIOLATION at eip=10006C12
eax=00000000 ebx=00000000 ecx=00000000 edx=00000002 esi=0022FCC8
edi=0022FEC8
ebp=0022FCC8 esp=0022F180 program=C:\cygwin\usr\src\sample.exe
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame     Function  Args
0022FCC8  10006C12  (0022FCD8, 6105E8AB, 00000000, 00000000)
End of stack trace


----- Original Message ----- 
From: "Fabrice Marchal" <[EMAIL PROTECTED]>
To: "Leif Johnston" <[EMAIL PROTECTED]>
Sent: Friday, January 30, 2004 9:04 AM
Subject: Re: mysqlclient.lib and missing references


> Hello Leif,
> I think you shoud also link  the wrapper library :
> -lmySQL
> Let me know if it works.
> I would like to hear from you also if your sample.exe works because I
> have encountered problems with the newest mysql/cygwin/g++
>
> Fabrice
>
>
> Leif Johnston wrote:
>
> >I am trying to compile a straightforward sample from the complete MYSQL
reference on windows, under cygwin and mysql 4.0.16.
> >
> >I have copied the winfiles into my cygwin space /usr/src and am executing
the following with the following results. With mysqlclient, I am getting no
useful compile with mySQL.lb I am getting close but am missing the
_mysql_free_results.
> >
> >Is there another lib I must get/use/?
> >
> >Thanks
> >
> >[EMAIL PROTECTED] /usr/src
> >$ gcc sample.c -o sample.exe -I/usr/include/mysql -L/lib/mysql -l
mysqlserver -lz
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccUIjujX.o(.text+0xa2):sample.c
: undefined reference to `_mysql_real_connect'
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccUIjujX.o(.text+0xb8):sample.c
: undefined reference to `_mysql_query'
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccUIjujX.o(.text+0xc6):sample.c
: undefined reference to `_mysql_store_result'
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccUIjujX.o(.text+0xda):sample.c
: undefined reference to `_mysql_fetch_row'
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccUIjujX.o(.text+0x13f):sample.
c: undefined reference to `_mysql_free_results'
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccUIjujX.o(.text+0x14d):sample.
c: undefined reference to `_mysql_close'
> >collect2: ld returned 1 exit status
> >
> >[EMAIL PROTECTED] /usr/src
> >$ gcc sample.c -o sample.exe -I/usr/include/mysql -L/lib/mysql/lib/opt -l
mySQL -lz
>
>/cygdrive/c/DOCUME~1/LJOHNS~1/LOCALS~1/Temp/ccG7fUqP.o(.text+0x13f):sample.
c: undefined reference to `_mysql_free_results'
> >collect2: ld returned 1 exit status
> >
> >
>
>
> -- 
> ========================================================================
> Fabrice Marchal           http://www.inf.ethz.ch/~marchal
> [EMAIL PROTECTED]  [EMAIL PROTECTED]         +41-(0)1-632-56-79
> ETH Zurich, CoLab Computational Laboratory        FAX:+41-(0)1-632-17-03
> ========================================================================
>
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to