0
votes

Hi I am trying to compile a program for windows using these instructions on github. I have installed the required dependencies (VS2017, cmake, cuda 8, amd app sdk 3.0).

I have placed the required xmr-stak-dep.zip in my C:/ folder, and the command tree. does line up with what is shown. The files are all accessible.

  C:\xmr-stak-dep>tree .

  Folder PATH listing for volume Windows
  Volume serial number is XX02-XXXX
  C:\XMR-STAK-DEP
  ├───hwloc
  │   ├───include
  │   │   ├───hwloc
  │   │   │   └───autogen
  │   │   └───private
  │   │       └───autogen
  │   └───lib
  ├───libmicrohttpd
  │   ├───include
  │   └───lib
  └───openssl
      ├───bin
      ├───include
      │   └───openssl
      └───lib

The problem is when the program is finally built by running the commands below; when the program is executed I recieve the error libeay32.dll & ssleay32.dll cannot be found. The command below does show that it did set cmake to that path containing those ddl files.

 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsMSBuildCmd.bat" 

 set CMAKE_PREFIX_PATH=C:\xmr-stak-dep\hwloc;C:\xmr-stak-dep\libmicrohttpd;C:\xmr-stak-dep\openssl

 mkdir build

 cd build

I have found this post that does show possibly how to fix this, but I am unsure how I would use the command with my configuration being this is my first time ever compiling a windows program.

As a note, I used the dev branch from here for the source.

1

1 Answers

1
votes

There is nothing wrong with your compilation. It's just that your program depends on those DLLs. Windows only looks in certain places when trying to find the DLLs that a program depends on.

This article describes how windows looks for DLLs: https://docs.microsoft.com/en-us/cpp/build/search-path-used-by-windows-to-locate-a-dll

The easiest options are to copy the openssl .dlls into the directory alongside your .exe, or to add the directory containing them to your path. The latter can be done temporarily via set PATH=C:\XMR-STAK-DEP\openssl\lib;%PATH% (presuming the DLLs are under openssl\lib else substitiute openssl\bin)