如何在VS2008中编译和链接Crypto ++ 5.6.0 [英] How to compile and link Crypto++ 5.6.0 in VS2008

查看:145
本文介绍了如何在VS2008中编译和链接Crypto ++ 5.6.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有cryptopp 5.6.0,在Unix中我可以正常工作.我必须将代码移植到32位Windows框上,并且正在使用vs2008.有没有办法我可以获取有关如何编译cryptopp代码以生成lib文件的特定说明,以便随后可以在vs2008中使用它?

当我简单地运行它以生成lib文件时,我得到了

这样的警告 c4081预期找到newlone
lnk4044无法识别的选项/lcryptopp被忽略
大量的lnk2005错误
警告lnk4098 LIBCMTD与其他库的使用冲突.使用/nodefaultlib库.
错误:找到lnk1169个多个定义的符号.

我真的需要关于vs2008的逐步说明.

谢谢


更新:
我能够使它在vs2008中工作.只需要编译在vs2008中cryptopp 5.6.0中提供的程序,它就会生成一个静态库.那么您必须确保您的解决方案在c/c ++代码生成菜单中使用了多线程调试.同样在链接器下,您需要添加lib文件名,还需要在.cpp文件中添加#pragma注释(lib,"cryptlib.lib");

这将使其工作.

现在该程序可以编译和链接,但我似乎无法执行.
它一直说......启动程序"myprog.exe"的系统无法找到指定的文件"

有人可以帮忙吗?为什么会发生这种情况,如何使它指向正确的可执行文件? (这是由vs2008生成的.我对非常熟悉此程序的人感兴趣,并且可以通过配置菜单等告诉我我做错了什么……也许我在项目创建中做错了什么,例如在配置属性中的常规"选项卡中有一个输出目录.我正在寻找非常特殊的内容.

Hi,
I have cryptopp 5.6.0 and in Unix i have it working. I have to port my code over to a 32bit windows box and am using vs2008. Is there a way I can get specific instructions on how to compile the cryptopp code to generate the lib file so i can then use it in vs2008?

when i simply ran it to generate the lib file i get
warnings like
c4081 expected newlone found
lnk4044 unrecognized option /lcryptopp ignored
A ton of lnk2005 errors
warning lnk4098 LIBCMTD conflicts with use of other libs. use /nodefaultlib library.
error: lnk1169 one more multiple defined symbols found.

i really need some step by step instructions on vs2008.

thanks


Update:
I was able to get it to work in vs2008. Just need to compile the program they provide in the cryptopp 5.6.0 in vs2008 and it generates a static library. then you have to make sure that YOUR solution is using multi threaded debug in the c/c++ code generation menu. also under the linker you need to add the lib file name and also in the .cpp file #pragma comment (lib,"cryptlib.lib");

this will make it work.

now the program compiles and links but i can''t seem to execute it.
it keeps saying...ubale to start program "myprog.exe" the system cannot find the file specified"

can anyone help with that ? why does that happen and how do i make it point to the correct executable? (this is generated by vs2008. I am interested in people who are very familiar with this program and can tell me via configuration menu''s etc what am i doing wrong...perhaps I have done something wrong in project creation or for example in the configuration properties there is an output directory in general tab. i am looking for something very particular.

thanks.

推荐答案

此网站 [
This site[^] is probably the best place to find the answer. Interestingly it suggests that a port for MSVC 2008 is not available.


我昨天刚刚在MSVC2008中构建了crypto 5.6.0.它可用于MSVC2008,并且在编译和链接期间没有问题.
I just yesterday built crypto 5.6.0 in MSVC2008. It is available for MSVC2008 and there where no problem during compilation and linking.


djones2010写道:
djones2010 wrote:

it一直说......启动程序"myprog.exe"时,系统找不到特定的文件.

it keeps saying...ubale to start program "myprog.exe" the system cannot find the file specificed"



什么是它",如果您是指Windows,那么我想您没有单击正确的文件.除此之外,我无法猜测您的可执行文件可能在哪里.



What is "it", if you mean Windows, then I guess you are not clicking on the correct file. Other than that I cannot guess where your executable file may be.


这篇关于如何在VS2008中编译和链接Crypto ++ 5.6.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆