Hello,
I successfully compiled MySQL embedded library from
source. It resulted in libmysqld.dll and libmysqld.lib
created in lib_debug directory.
Compiling my test application after linking it with
libmysqld.lib and using libmysqld.dll it is never
going past mysql_server_init.
If I debug it by pressing F5, as soon as it reached
the function it exists saying:
User breakpoint called from 0xxxxxxx
If I remove the breakpoint then it just
exits...without doing anything. I created the test app
as shown in docs:
#include <winsock.h>
#include <mysql.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
MYSQL *db_connect(const char *dbname);
void db_disconnect(MYSQL *db);
void db_do_query(MYSQL *db, const char *query);
static char *server_args[] = {
"test", /* this string is not used */
"--datadir=.",
"--key_buffer_size=32M"
};
static char *server_groups[] = {
"embedded",
"server",
"test_SERVER",
(char *)NULL
};
int
main(int argc, char **argv)
{
MYSQL *one, *two;
if (mysql_server_init(sizeof(server_args) /
sizeof(char *), server_args, server_groups))
exit(1);
one = db_connect("test");
two = db_connect(NULL);
db_do_query(one, "SHOW TABLE STATUS");
db_do_query(two, "SHOW DATABASES");
mysql_close(two);
mysql_close(one);
This must be called after all other mysql functions
mysql_server_end();
exit(EXIT_SUCCESS);
}
My my.ini located in c:\windows\ has the following
value:
[embedded]
datadir=g:/my4015/data
Do I need to add anything extra?
There exists a data directory and there is a test
table. Actually this is the sample data directory
created by MySQL 4.0.18 binary.
What am I doing wrong? Or I am getting the embeddeble
library completely wrong...
Karam
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]