简体   繁体   English

MySQL和MATLAB 64位

[英]MySQL and MATLAB 64 bit

I'm trying to connect to MySQL using MATLAB R2009b 64 bit and the mysql.cpp file found on the FEX and here . 我试图使用64位MATLAB R2009b和在FEX此处找到的mysql.cpp文件连接到MySQL。 I followed all the steps to compile listed in the second link. 我按照第二个链接中列出的所有步骤进行了编译。 After entering the following: 输入以下内容后:

mex -I"C:\mysql\include" -DWIN32 mysql.cpp "C:\mysql\lib\opt\libmySQL.lib"

the mysql.mexw64 file is created in my working directory. 在我的工作目录中创建了mysql.mexw64文件。 However, when I go to test it, I get the following error: 但是,当我进行测试时,出现以下错误:

>> mysql('status')
??? Invalid MEX-file 'C:\[path]\mysql.mexw64': C:\[path]\mysql.mexw64 is not a valid Win32 application.

I tried switching out the -DWIN32 with -DWIN64, but that just threw all sorts of errors. 我试图用-DWIN64切换-DWIN32,但这只会引发各种错误。 Anyone have a suggestion as to why this isn't working? 任何人都有建议,为什么这不起作用?

I'm using MATLAB R2009b 64 bit on Windows 7 64 bit. 我在Windows 7 64位上使用MATLAB R2009b 64位。

libmysql.dll is a 32-bit library. libmysql.dll是一个32位库。 Matlab 64-bit wants mex-files to be compiled in 64-bit mode. Matlab 64位希望以64位模式编译mex文件。 Unless you can recompile the library, you won't be able to get the mex-file to work, I'm afraid. 除非您可以重新编译该库,否则恐怕无法使mex文件正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM