怎么在windows下用VC6.0工具连接mysql,我现在不需要代码,只想知道怎么加载libmySQL.dll步骤是什么??我用LoadLibrary("libmySQL.dll");加载报错:E:\BT_SRC\demo\demo.cpp(5):erro...
怎么在windows下 用VC 6.0工具连接mysql, 我现在不需要代码,只想知道怎么加载libmySQL.dll
步骤是什么??我用LoadLibrary("libmySQL.dll");加载报错:
E:\BT_SRC\demo\demo.cpp(5) : error C2501: 'LoadLibraryA' : missing storage-class or type specifiers
E:\BT_SRC\demo\demo.cpp(5) : error C2373: 'LoadLibraryA' : redefinition; different type modifiers
c:\program files\microsoft visual studio\vc98\include\winbase.h(4159) : see declaration of 'LoadLibraryA'
E:\BT_SRC\demo\demo.cpp(5) : error C2440: 'initializing' : cannot convert from 'char [13]' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
用这个#pragma comment(lib, "libmysql.dll")加载,将libmysql.dll拷贝到当前工程目录报错:
ibmysql.dll : warning LNK4003: invalid library format; library ignored
libmysql.dll : warning LNK4003: invalid library format; library ignored
demo.obj : error LNK2001: unresolved external symbol _mysql_free_result@4
demo.obj : error LNK2001: unresolved external symbol _mysql_num_fields@4
demo.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4
demo.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4
demo.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
demo.obj : error LNK2001: unresolved external symbol _mysql_query@8
demo.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32
demo.obj : error LNK2001: unresolved external symbol _mysql_init@4
注:我完整的安装了mysql 5.1
满意一定高分!!!
展开