简体   繁体   English

Boost无法找到lib

[英]Boost can not find lib

I'm interrested in unit test so i decided to install boost to make some unit tests included in that libraries. 我对单元测试很感兴趣,所以我决定安装boost来对这些库中包含一些单元测试。

First I've installed this: http://sourceforge.net/projects/boost/files/boost-binaries/1.57.0/ Then I've changed paths in my VS2013 to find headers and libs(libs at linker options). 首先我安装了这个: http//sourceforge.net/projects/boost/files/boost-binaries/1.57.0/然后我在VS2013中更改了路径以查找头文件和库(链接器选项中的库)。 Then I had a problemem with x64 machine, so I did that: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' 然后我遇到了x64机器的问题,所以我这样做了: 致命错误LNK1112:模块机器类型'x64'与目标机器类型'X86'冲突

And right now I got a windows-massage, after compilation when program is about to run, which sounds like: It's not possible to run a program, becouse in that computer it is not able to find boost_unit_test_framework-vc120-mt-1_57.dll. 现在我得到了一个窗口按摩,编译后程序即将运行,这听起来像:无法运行程序,因为在那台计算机上它无法找到boost_unit_test_framework-vc120-mt-1_57.dll 。 Try to reinstal program, to repair that problem. 尝试重新安装程序,以修复该问题。

But I got that file in my C:\\lib\\boost_1_57_0\\lib64-msvc-12.0 catalog. 但是我在C:\\ lib \\ boost_1_57_0 \\ lib64-msvc-12.0目录中获得了该文件。

what can I do? 我能做什么?

In order to make the system to find a .dll file at runtime of a program, you need to add the directory where the .dll is located to the PATH environment variable. 为了使系统在程序运行时找到.dll文件,您需要将.dll所在的目录添加到PATH环境变量中。 Eg from the console (before running a program) 例如从控制台(运行程序之前)

C:\Users\XYZ> set PATH="%PATH%;c:\directory_of_dll"

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

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