问题描述
所以,因为周六我试图安装的MySQL Connector C ++使用VS2012。我会离开它没有评论,我不得不下载1XX MB升压库只是从我的程序运行简单的查询笑。尽管如此,它不工作。
So since Saturday I am trying to setup MySQL Connector C++ with VS2012. I'll leave it without commentary that I had to download 1xx mb Boost libs just to run simple query from my program lol. Nevertheless it doesn't work.
问题是,即使我安装一切正常(从官方网站的MySQL Connector手册),它只是不能工作 - 因为我下载了最新的包不包含在手册中列出的文件。手动状态:
The problem is that even when I setup everything correctly (following MySQL Connector Manual from official site) it just can't work - because the latest package that I downloaded does not contains files listed in manual. Manual states:
添加的lib / opt目录到附加库目录文本字段。这使得库文件libmysql.lib被发现。
Add the lib/opt directory into the Additional Library Directories text field. This enables the library file libmysql.lib to be found.
但没有libmysql.lib和/或libmysql.dll的。
But there is no libmysql.lib and/or libmysql.dll.
当我收到明显的错误:错误LNK1181:无法打开输入文件'libmysql.lib
When building I receive obvious error: error LNK1181: cannot open input file 'libmysql.lib'
我如何设置使其正常工作?
How can I setup this to work correctly?
P.S。我复制的问题,从计算器,因为我有完全一样的问题,但没有人回答这个问题。
P.S. I copy the question from stackoverflow, because i have exactly the same question, but noone answer this question.
推荐答案
下载MySQL服务器://dev.mysql。 COM /下载/ mysql /下。它包含libmysql.lib。之后你libmysql.lib你会得到错误缺少的libmysql.dll或者类似的东西,然后链接你的项目,你必须复制libmysql.dll拷贝到release文件夹
Download mysql server from http://dev.mysql.com/downloads/mysql/. It contains libmysql.lib. After you link your project with libmysql.lib you will get error "Missing libmysql.dll" or something like that, and then you'll have to copy libmysql.dll to release folder
和我不知道这将如何与你的工作,但我不得不下载服务器的32位版本。
And I'm not sure how this will work with you but I had to download 32bit version of server.
P.S。我知道,大约2周从你的问题通过,但它永远不会太晚,它可能会帮助别人。
P.S. I know about 2 weeks passed from your question but it's never too late, it might help someone.
这篇关于MySQL的连接器C ++不包含libmysql.lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!