C MySQL错误"致命错误LNK1107:无效或损坏文件:不能在0x368读取"

时间:2023-01-15 08:31:06

first off i'd like to start by explaining i am new to none web based programing languages, so this is really all new to me. But ive been trying to solve this problem all night and cant seem to get it.

首先,我想先向大家解释一下,我对基于web的编程语言一无所知,所以这对我来说是全新的。但是我整晚都在努力解决这个问题,似乎没有办法。

so I just installed a bunch of MySQL libraries. I create links to all the libraries and since I have done that, this error message has been popping up.I did a little bit of research on it, and it appears that the sarah message is happening because I'm using the dynamic library.but I have absolutely no idea how to go 5about fixing it.also I must point out that I am using it the Microsoft Visual C++ 2010 compilerand the code blocks Ide, even though I am currently working in the C language. any help anyone can give me is greatly appreciated. Thank you.

我安装了一些MySQL库。我创建了到所有库的链接,因为我已经做了,这个错误消息已经出现了。我做了一些研究,看起来莎拉的信息正在发生因为我在使用动态库。但是我完全不知道如何去修复它。另外,我还必须指出,我正在使用的是Microsoft Visual c++ 2010的编译器和代码块Ide,尽管我目前使用的是C语言。我非常感激任何人给我的帮助。谢谢你!

Also not sure if it helps but heres my code.

也不确定它是否有用,但这是我的代码。

#include <my_global.h>
#include <mysql.h>

int main(int argc, char **argv)
{
  printf("MySQL client version: %s\n", mysql_get_client_info());

  return 0;
}

1 个解决方案

#1


1  

This might help you http://www.chriscalender.com/?tag=libmysql-dll-fatal-error-lnk1107-invalid-or-corrupt-file I think.

这可能会帮助你http://www.chriscalender.com/?标签= libmysql-dll-fatal-error-lnk1107-invalid-or-corrupt-file我认为。

"The problem is trying to use the .dll instead of the .lib, so replace libmysql.dll with libmysql.lib."

问题是要使用.dll而不是.lib,所以要替换libmysql。dll libmysql.lib。”

Try and see.

试着看看。

#1


1  

This might help you http://www.chriscalender.com/?tag=libmysql-dll-fatal-error-lnk1107-invalid-or-corrupt-file I think.

这可能会帮助你http://www.chriscalender.com/?标签= libmysql-dll-fatal-error-lnk1107-invalid-or-corrupt-file我认为。

"The problem is trying to use the .dll instead of the .lib, so replace libmysql.dll with libmysql.lib."

问题是要使用.dll而不是.lib,所以要替换libmysql。dll libmysql.lib。”

Try and see.

试着看看。