Hi,

 

I have installed MySQL 6.0.6-alpha on Redhat Linux. I have copied the
example program from 

http://teaching-.cs.uml.edu/MySQLdocs/MySQL_Manual/mysql_execute.html
and compiled as follows.

 

gcc -o insert_by_bind -I/usr/local/mysql/include -L/usr/local/mysql/lib
-lmysqlclient -lz -lrt -lcrypt -lnsl -lm insert_by_bind.c

 

But I am getting the errors like:

 

insert_by_bind.c: undefined reference to `mysql_prepare'

/tmp/ccF5dT9h.o(.text+0x242):insert_by_bind.c: undefined reference to
`mysql_param_count'

/tmp/ccF5dT9h.o(.text+0x317):insert_by_bind.c: undefined reference to
`mysql_bind_param'

/tmp/ccF5dT9h.o(.text+0x3c1):insert_by_bind.c: undefined reference to
`mysql_execute'

/tmp/ccF5dT9h.o(.text+0x4cf):insert_by_bind.c: undefined reference to
`mysql_execute'

collect2: ld returned 1 exit status

 

I have set all the parameter....

 

LD_LIBRARY_PATH   --> /usr/local/mysql/lib/

LD_LIBRARY             --> /usr/local/mysql/lib/

Added the /usr/local/mysql/lib/ to ld.so.conf and executed the command
ldconfig.

 

Hope someone will help me in this regard.

 

Thanks in advance.

 

Regards,

iqbal



EMAIL DISCLAIMER : This email and any files transmitted with it are 
confidential and intended solely for the use of the individual or entity to 
whom they are addressed. Any unauthorised distribution or copying is strictly 
prohibited. If you receive this transmission in error, please notify the sender 
by reply email and then destroy the message. Opinions, conclusions and other 
information in this message that do not relate to official business of Mascon 
shall be understood to be neither given nor endorsed by Mascon. Any information 
contained in this email, when addressed to Mascon clients is subject to the 
terms and conditions in governing client contract.

Whilst Mascon takes steps to prevent the transmission of viruses via e-mail, we 
can not guarantee that any email or attachment is free from computer viruses 
and you are strongly advised to undertake your own anti-virus precautions. 
Mascon grants no warranties regarding performance, use or quality of any e-mail 
or attachment and undertakes no liability for loss or damage, howsoever caused. 


Reply via email to