title: Undefined reference to DES_ecb_encrypt, MD4_Init, MD4_Update and MD4_Final
body: <p>I need to compile App.exe on ubuntu 16. I installed mingw-w64, openssl and curl:</p>
  
  <pre><code>sudo apt-get install mingw-w64
  wget http://www.openssl.org/source/openssl-1.0.2k.tar.gz
  tar -xzvf openssl-1.0.2k.tar.gz
  cd openssl-1.0.2k/
  ./Configure mingw64 shared --cross-compile-prefix=x86_64-w64-mingw32- --prefix=/usr/x86_64-w64-mingw32/
  make
  sudo make install
  cd ..
  wget https://curl.haxx.se/download/curl-7.53.1.tar.gz
  tar -xzvf curl-7.53.1.tar.gz
  cd curl-7.53.1/
  ./configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=i686-pc-linux-gnu --prefix=/usr/x86_64-w64-mingw32 --enable-static --disable-shared --with-ssl --with-zlib
  make
  sudo make install
  cd ..
  x86_64-w64-mingw32-g++ -v -o test.exe test.cpp -static -DCURL_STATICLIB -lcurl
  </code></pre>
  
  <p>Installation is performed without errors, but when compiling:</p>
  
  <pre><code>x86_64-w64-mingw32-g++ -v -o test.exe test.cpp -static -DCURL_STATICLIB -lcurl
  </code></pre>
  
  <p>test.cpp:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;curl/curl.h&gt;
  
  using namespace std;
  
  int main(int argc, char **argv)
  {
      cout &lt;&lt; curl_version() &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>compiler other errors:</p>
  
  <pre><code>    ...
  
      /usr/lib/gcc/x86_64-w64-mingw32/5.3-win32/../../../../x86_64-w64-mingw32/lib/libcurl.a(libcurl_la-curl_ntlm_core.o):curl_ntlm_core.c:(.text+0x202): undefined reference to `DES_ecb_encrypt'
      /usr/lib/gcc/x86_64-w64-mingw32/5.3-win32/../../../../x86_64-w64-mingw32/lib/libcurl.a(libcurl_la-curl_ntlm_core.o):curl_ntlm_core.c:(.text+0x2fe): undefined reference to `MD4_Init'
      /usr/lib/gcc/x86_64-w64-mingw32/5.3-win32/../../../../x86_64-w64-mingw32/lib/libcurl.a(libcurl_la-curl_ntlm_core.o):curl_ntlm_core.c:(.text+0x30c): undefined reference to `MD4_Update'
      /usr/lib/gcc/x86_64-w64-mingw32/5.3-win32/../../../../x86_64-w64-mingw32/lib/libcurl.a(libcurl_la-curl_ntlm_core.o):curl_ntlm_core.c:(.text+0x317): undefined reference to `MD4_Final'
      collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>I do not know where I'm wrong. You do?</p>