Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用vs2010编译失败,缺cryptopp.lib #185

Closed
johnsonchase opened this issue Jan 29, 2013 · 9 comments
Closed

用vs2010编译失败,缺cryptopp.lib #185

johnsonchase opened this issue Jan 29, 2013 · 9 comments

Comments

@johnsonchase
Copy link

LINK : fatal error LNK1104: cannot open file 'cryptopp.lib'

不知道需要crypto++的哪个版本?

@ubun
Copy link
Contributor

ubun commented Jan 29, 2013

请用QT 4.6及以上版本编译

@johnsonchase
Copy link
Author

我使用的版本是Qt 4.8.2
cryptopp.lib应该来源于crypto++这个库吧。应该跟Qt无关

@ubun
Copy link
Contributor

ubun commented Jan 29, 2013

看lib文件夹里有个readme文件,里面有说明

@johnsonchase
Copy link
Author

readme是这样的:
1、运行libcryptocpp.a网页快捷方式,将网盘中的libcryptocpp.a下载回来。
2、将本目录下的所有文件(包括刚下回来的libcryptocpp.a)一起复制到编译目录。
3、注意libcryptocpp.a只适用于QTCreator,如你用VS编译,则需另外想办法。

.a文件是为Linux版本准备的,我用的是VS,望指教

@Moligaloo
Copy link
Contributor

@johnsonchase

  1. .a 文件是 GCC 等编译器生成的静态库文件的后缀名,并非专为 Linux 准备, Windows 下用 GCC 编译器生成的静态库也仍然是以 .a 为后缀
  2. VS 的话,下载 Crypto++ 的源代码,用 VS 编译即可。

@johnsonchase
Copy link
Author

谢谢指教。

我下载了crypto++ 5.6.0源码,用VS打开里面提供的.sln,编译cryptlib产生静态库
重新编译qsanguosha,会出现以下错误:
error LNK2001: unresolved external symbol "class CryptoPP::NameValuePairs const & const CryptoPP::g_nullNameValuePairs" (?g_nullNameValuePairs@CryptoPP@@3ABVNameValuePairs@1@B)

由于对crypto++不太熟,望能指教。

@johnsonchase
Copy link
Author

但看源代码,g_nullNameValuePairs明明定义在cryptlib.cpp中。

@baidang201
Copy link

”用vs2010编译失败,缺cryptopp.lib“解决方案
下载安装“Qt libraries 4.8.4 for Windows (minGW 4.4, 317 MB)”版,安装minGW4.4,使用qtcreator IDE(注意在qtcreator 设置Qt版本<qt4.8.4>和编译器路径<D:\MinGW\bin\g++.exe>,以此组合为构建套件),编译成功,有警告但不报错

@ubun ubun closed this as completed Feb 19, 2013
@crioux
Copy link

crioux commented Oct 10, 2013

If you're linking against cryptopp dll, you need to #define CRYPTOPP_IMPORTS in your source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants