www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Call mysql failed

reply mooncake <mooncake_member pathlink.com> writes:
Hi, what happen to me when i compile it, prompt me this error message...

Error 42: Symbol Undefined _mysql_init 4


#include <stdio.h>
#include <mysql/mysql.h>

main(){
MYSQL *mysql;
mysql_init(&mysql);

}

Thank you.
Dec 13 2003
parent reply Jan Knepper <jan smartsoft.us> writes:
Well, I think you would have to include the MySQL library into your link 
phase.
Probably more of an issue... You might have to recompile the MySQL 
library for Digital Mars C++.

HTH

mooncake wrote:
 Hi, what happen to me when i compile it, prompt me this error message...
 
 Error 42: Symbol Undefined _mysql_init 4
 
 
 #include <stdio.h>
 #include <mysql/mysql.h>
 
 main(){
 MYSQL *mysql;
 mysql_init(&mysql);
 
 }
 
 Thank you.
 
 

-- ManiaC++ Jan Knepper
Dec 13 2003
parent reply mooncake <mooncake_member pathlink.com> writes:
Hi, 
Would you mind to teach me how to include the MySQL library into my link phase?
How to recompile the MySQL library?

Thank you...

In article <brf6v2$1dlq$1 digitaldaemon.com>, Jan Knepper says...
Well, I think you would have to include the MySQL library into your link 
phase.
Probably more of an issue... You might have to recompile the MySQL 
library for Digital Mars C++.

HTH

mooncake wrote:
 Hi, what happen to me when i compile it, prompt me this error message...
 
 Error 42: Symbol Undefined _mysql_init 4
 
 
 #include <stdio.h>
 #include <mysql/mysql.h>
 
 main(){
 MYSQL *mysql;
 mysql_init(&mysql);
 
 }
 
 Thank you.
 
 

-- ManiaC++ Jan Knepper

Dec 13 2003
parent Jan Knepper <jan smartsoft.us> writes:
Well, this requires some study if you have never done anything like it.
Is the MySQL library you are using C or C++?
If it is C you might be able to just add it to the project and link it.
If it is C++ you more likely will have to recompile it.
I think the sources to the MySQL client are freely available, so what 
you could do it research them and look for the existing project(s) / 
makefile(s) on how they build the .lib for specific compilers and build 
something like it for DMC++

HTH

mooncake wrote:
 Hi, 
 Would you mind to teach me how to include the MySQL library into my link phase?
 How to recompile the MySQL library?
 
 Thank you...
 
 In article <brf6v2$1dlq$1 digitaldaemon.com>, Jan Knepper says...
 
Well, I think you would have to include the MySQL library into your link 
phase.
Probably more of an issue... You might have to recompile the MySQL 
library for Digital Mars C++.

HTH

mooncake wrote:

Hi, what happen to me when i compile it, prompt me this error message...

Error 42: Symbol Undefined _mysql_init 4


#include <stdio.h>
#include <mysql/mysql.h>

main(){
MYSQL *mysql;
mysql_init(&mysql);

}

Thank you.

-- ManiaC++ Jan Knepper


-- ManiaC++ Jan Knepper
Dec 14 2003