Basic self_encryptor example DIY instructions

Hi All ! I am also trying to build the self_encryption module on windows 10 64bit.

I was stuck on the libdodium installation until i saw @Tom_Carlson’s post in this topic:

download https://download.libsodium.org/libsodium/releases/libsodium-1.0.2.tar.gz3
cd crust (or cd routing)
mkdir bin
cd bin
mkdir x86_64-pc-windows-gnu
copy from the libsodium-1.0.2.tar.gz archive, only the libsodium.a file into the new bin/x86_64-pc-windows-gnu directory just made

I was not able to find the libsodium.a file, so instead ended up DLing the prebuilt version libsodium-1.0.2-msvc.zip, and putting the dll libsodium-1.0.2-msvc.zip\x64\Release\v120\dynamic\libsodium.dll in the folder self_encryption\bin\x86_64-pc-windows-gnu.

This apparently solved my compiling issues, but running the example sends out an error.

PS C:\Users\jean-\Documents\GitHub\self_encryption> cargo run --verbose --example basic_encryptor -- -e C:\AA_project.pdf
       Fresh strsim v0.3.0
       Fresh byteorder v0.3.10
       Fresh rustc-serialize v0.3.15
       Fresh libc v0.1.8
       Fresh regex-syntax v0.1.2
       Fresh cbor v0.3.7
       Fresh memchr v0.1.3
       Fresh libsodium-sys v0.0.5
       Fresh rand v0.3.8
       Fresh num_cpus v0.2.6
       Fresh aho-corasick v0.2.1
       Fresh sodiumoxide v0.0.5
       Fresh tempdir v0.3.4
       Fresh asynchronous v0.4.5
       Fresh regex v0.1.38
       Fresh docopt v0.6.67
       Fresh self_encryption v0.2.0 (file:///C:/Users/jean-/Documents/GitHub/self_encryption)
     Running `target\debug\examples\basic_encryptor.exe -e C:\AA_project.pdf`
Process didn't exit successfully: `target\debug\examples\basic_encryptor.exe -e C:\AA_project.pdf` (exit code: -1073741515)

Looking with Google, the error code seems to be of a missing dll, so I guess the error indeed comes from the way I dealt with libsodium.
It could also be gcc, but to my understanding things seem ok on this side:

PS C:\Users\jean-\Documents\GitHub\self_encryption> gcc -v
Using built-in specs.
COLLECT_GCC=C:\TDM-GCC-64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/TDM-GCC-64/bin/../libexec/gcc/x86_64-w64-mingw32/5.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-5.1.0/configure --build=x86_64-w64-mingw32 --enable-targets=all --enable-languages=ada,c,c++,fortran
,lto,objc,obj-c++ --enable-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC --disable-build-with-cxx --di
sable-build-poststage1-with-cxx --enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime-libs --enable-fully-
dynamic-string --enable-libstdcxx-threads --enable-libstdcxx-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registr
y --prefix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-1 --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 5.1.0 (tdm64-1)

Would someone have an idea about where my mistakes are :smile: ?