0

I'm interrested in unit test so i decided to install boost to make some unit tests included in that libraries.

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). 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'

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. 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.

what can I do?

Community
  • 1
  • 1
  • Add `C:\lib\boost_1_57_0\lib64-msvc-12.0` to your `PATH` environment variable. – πάντα ῥεῖ Feb 22 '15 at 11:32
  • I did it. I've created C:\lib\boost_1_57_0\lib64-msvc-12.0 named boost_lib and also C:\lib\boost_1_57_0\ named boost –  Feb 22 '15 at 11:40
  • _"I did it"_ You did what actually? You have added this directory to `PATH` already, and it's still not found, when you're running your program? – πάντα ῥεῖ Feb 22 '15 at 11:41
  • I've added boost to my Path enviroment variable: http://i60.tinypic.com/dmdv20.png biblioteki means libs. –  Feb 22 '15 at 11:46
  • You need to specify the directory in `PATH` where this `.dll` file can be found. I'm talking about `PATH` not those other variables you show! – πάντα ῥεῖ Feb 22 '15 at 11:47
  • Yea, but this .dll is exactly in C:\biblioteki\boost_1_57_0\lib64-msvc-12.0 So (if I understand you well) I've specified directory in Path where this .dll can be found. (Path named Boost_lib_1_57_0pro). em I wrong? –  Feb 22 '15 at 11:54
  • You should just add this directory literally to `PATH` (without using a different environment variable), `PATH` might be established, before these other variables are set. – πάντα ῥεῖ Feb 22 '15 at 11:57
  • OMG. I guess I understand you now. w8 a minute –  Feb 22 '15 at 12:01
  • U meant that? http://i61.tinypic.com/20utwn7.png –  Feb 22 '15 at 12:06
  • Yes of course. What's so hard to get when I write `PATH`? – πάντα ῥεῖ Feb 22 '15 at 12:07
  • I forgot that there is a variable called Path. My bad, sorry ;) It's working, thanks –  Feb 22 '15 at 12:09

1 Answers1

0

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. E.g. from the console (before running a program)

C:\Users\XYZ> set PATH="%PATH%;c:\directory_of_dll"
πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190