简体   繁体   English

将 VS 32 位项目转换为 64

[英]Convert VS 32 bit project to 64

There is an abandoned project, that builds correctly in 32bit version, but I need 64bit version of it.有一个废弃的项目,可以在 32 位版本中正确构建,但我需要 64 位版本。 I tried to change project setting to x64 in visual studio, but when I click build I get lots of errors.我试图在 Visual Studio 中将项目设置更改为 x64,但是当我单击构建时,我得到了很多错误。 Here are the visual studio files .这是视觉工作室文件 And here is more info about the project .这是有关该项目的更多信息。 I have no experience with VS and c++.我对 VS 和 c++ 没有经验。

This is a DLL, that makes connection between MT5 platform and MySQL, using libmysql.dll.这是一个 DLL,它使用 libmysql.dll 在 MT5 平台和 MySQL 之间建立连接。 I would like to read and write data to/from MySQL using MT5.我想使用 MT5 向 MySQL 读写数据。

I would appreciate if you could help me to convert this to 64 bits, the 32 bit version can not be loaded to MT5.如果您能帮我将其转换为 64 位,我将不胜感激,32 位版本无法加载到 MT5。

Here are the first 5 error:这是前5个错误:

1>MQLMySQL.obj : error LNK2019: unresolved external symbol mysql_num_rows referenced in function "int __cdecl cMySqlCursorRows(int)" (?cMySqlCursorRows@@YAHH@Z)
1>MQLMySQL.obj : error LNK2019: unresolved external symbol mysql_num_fields referenced in function "wchar_t * __cdecl cMySqlGetRowField(int,unsigned int)" (?cMySqlGetRowField@@YAPEA_WHI@Z)
1>MQLMySQL.obj : error LNK2019: unresolved external symbol mysql_errno referenced in function "bool __cdecl MySqlExecute(int,wchar_t *)" (?MySqlExecute@@YA_NHPEA_W@Z)
1>MQLMySQL.obj : error LNK2019: unresolved external symbol mysql_error referenced in function "bool __cdecl MySqlExecute(int,wchar_t *)" (?MySqlExecute@@YA_NHPEA_W@Z)
1>MQLMySQL.obj : error LNK2019: unresolved external symbol mysql_init referenced in function "int __cdecl cMySqlConnect(wchar_t *,wchar_t *,wchar_t *,wchar_t *,int,wchar_t *,int)" (?cMySqlConnect@@YAHPEA_W000H0H@Z)
1>MQLMySQL.obj : error LNK2019: unresolved external symbol mysql_real_connect referenced in function "int __cdecl cMySqlConnect(wchar_t *,wchar_t *,wchar_t *,wchar_t *,int,wchar_t *,int)" (?cMySqlConnect@@YAHPEA_W000H0H@Z)

From the first 5 errors you've had, it looks like a linker issue.从您遇到的前 5 个错误来看,它看起来像是 linker 问题。 Most compiled languages compile the source (c++) code into object files and then link them with existing libraries.大多数编译语言将源代码 (c++) 编译成 object 文件,然后将它们与现有库链接。 If the source compiles, but you can't link to the external libraries (for example they aren't installed) then you'll get errors like you've described.如果源代码可以编译,但您无法链接到外部库(例如它们未安装),那么您将收到如您所描述的错误。

Is there an external library that you need to reference, or are all of your source files organized in such a way that they can reference each other?是否有您需要引用的外部库,或者您的所有源文件是否以可以相互引用的方式组织?

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

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