久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何將 mysqlcppconn.lib 鏈接到 C++ 項目

How to link mysqlcppconn.lib to a c++ project(如何將 mysqlcppconn.lib 鏈接到 C++ 項目)
本文介紹了如何將 mysqlcppconn.lib 鏈接到 C++ 項目的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我正在嘗試在我的 C++ 項目中使用 mysqlcppconn.lib.但是,當(dāng)我使用庫中的功能時,出現(xiàn)錯誤:

 Severity Code 描述 Project File Line Suppression State函數(shù)public: void __thiscall Achievement::set(void)"中引用的錯誤LNK2019未解析的外部符號_mysql_init@4(?set@Achievement@@QAEXXZ) 僵尸 C:\Users\jorda\OneDrive - Limerick Institute of Technology\College\Final Year Project\Achievement_Libary\Copy - Copy\zombie\Achievement.obj 1

我正在使用的代碼:

 MYSQL* conn;MYSQL_ROW 行;MYSQL_RES* 資源;conn = mysql_init(0);

錯誤似乎來自mysql_init(0);

我已經(jīng)嘗試了 32 位和 64 位版本的庫,但都給出了相同的錯誤.我不確定是否需要在可執(zhí)行目錄中放入一些 dll.我試過把 libssl-1_1.dll &libcrypto-1_1.dll 來自 32 位和 64 位文件,因為這是一個教程所做的,但是這不起作用.

有人知道在 Visual Studio 項目中嘗試使用 C++ 連接器的過程嗎?任何幫助表示贊賞.這是鏈接器的庫和輸入路徑

解決方案

<塊引用>

有人知道在 Visual Studio 項目中嘗試使用 C++ 連接器的過程嗎?

我建議您可以嘗試以下步驟:

1、將頭文件的路徑添加到Additional Include Directories(property - >c/c++ -> General -> Additional Include Directories)

2、將.lib文件的路徑添加到Additional Library Directories(屬性->鏈接器->常規(guī)->附加庫目錄)

3、將.lib文件名及其擴(kuò)展名添加到Additional Dependencies(屬性->鏈接器->輸入->附加依賴項)

我建議您可以嘗試檢查文件是否在您指定的位置,或者您是否提供了正確的庫路徑.你不能混合 32 位和 64 位.請確保您將 64 位庫與 64 位應(yīng)用程序鏈接,或者將您的應(yīng)用更改為 32 位并與 32 位庫鏈接.

I'm trying to use the mysqlcppconn.lib in my c++ project. However, when I put use functionality from the library I get an error:

 Severity   Code    Description Project File    Line    Suppression State
Error   LNK2019 unresolved external symbol _mysql_init@4 referenced in function "public: void __thiscall Achievement::set(void)" (?set@Achievement@@QAEXXZ) zombie  C:\Users\jorda\OneDrive - Limerick Institute Of Technology\College\Final Year Project\Achievement_Libary\Copy - Copy\zombie\Achievement.obj 1

The code I'm using:

    MYSQL* conn;
    MYSQL_ROW row;
    MYSQL_RES* res;
    conn = mysql_init(0);

The errors seems to come from the mysql_init(0);

I've tried both the 32 and 64-bit version of the library but both give the same error. I'm not sure if I need to put some dlls inside the executable directory. I've tried putting libssl-1_1.dll & libcrypto-1_1.dll from both the 32 bit and 64-bit files as that's what one tutorial did however this did not work.

Would anyone know the process of trying to use the C++ connector in a visual studio project? Any help is appreciated. Here are the lib and input paths from the Linker

解決方案

Would anyone know the process of trying to use the C++ connector in a visual studio project?

I suggest you could try the following steps:

1,Add the path to the header file to the Additional Include Directories(property - >c/c++ -> General -> Additional Include Directories)

2,Add the path to the .lib file to the Additional Library Directories (property -> linker -> General -> Additional Library Directories)

3,Add the name of the .lib file with its extension to Additional Dependencies (property -> linker -> input -> Additional Dependencies)

I suggest you could try to check if the file is in the location that you specified, or if you have provided the correct library path. And you couldn't mix 32 bit and 64 bit. Please make sure you're linking in 64-bit libraries with the 64-bit application, or change your app to 32-bit and link with the 32-bit libraries.

這篇關(guān)于如何將 mysqlcppconn.lib 鏈接到 C++ 項目的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Typeorm Does not return all data(Typeorm 不返回所有數(shù)據(jù))
MySQL return extra records when using a long type number to filter varchar type(MySQL在使用長類型數(shù)字過濾varchar類型時返回額外記錄)
MySQL Error #1071 - Specified key was too long; max key length is 767 bytes(MySQL 錯誤 #1071 - 指定的鍵太長;最大密鑰長度為 767 字節(jié))
MySQL command-line table column width with utf8(MySQL命令行表列寬與utf8)
Python unicode encoding issue(Python unicode 編碼問題)
Create a MySQL stored function with a dynamic number of arguments(創(chuàng)建一個帶有動態(tài)參數(shù)數(shù)量的 MySQL 存儲函數(shù))
主站蜘蛛池模板: 亚洲国产欧美在线 | 亚洲人成人一区二区在线观看 | 午夜久久久久久久久久一区二区 | 一区二区三区四区在线视频 | 粉嫩粉嫩芽的虎白女18在线视频 | 久久91视频 | 91成人免费电影 | 久草在线 | 久热久 | 国产精品18久久久久久白浆动漫 | 欧美性一区二区三区 | 91精品国产麻豆 | 激情久久网 | 天天拍天天草 | 色永久 | 中日韩毛片 | 国产精品免费福利 | 久久久久久亚洲欧洲 | 久久久久久国产精品久久 | 91社区视频| 精品国产乱码一区二区三区 | 久久精品1 | 国产福利资源在线 | 亚洲精品2区| 精品国产99 | 久久91精品国产一区二区 | 免费观看一级特黄欧美大片 | 99久久精品一区二区成人 | 尤物在线精品视频 | 欧美一级三级 | 国产精品美女久久久久久免费 | 国产视频久久久久 | 亚洲精品久久 | 亚洲综合视频 | 国产精品免费大片 | 天天摸天天看 | 久久久久久亚洲精品 | 精品免费国产一区二区三区四区介绍 | 精品在线一区二区 | 日本成人中文字幕在线观看 | 欧美精品在线一区 |