"cannot find -lcrypto -lssl" with OpenSSL on Windows with MinGW
<p>Trying out a c code for openssl, and this error showed up while compiling it in the command prompt.</p>

<pre><code>c:\openssl&gt;gcc -lssl -lcrypto -o test test.c -IC:\openssl\include\
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lssl
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lcrypto
collect2.exe: error: ld returned 1 exit status
</code></pre>

<p>now what should i do, please help.</p>

<p>Edit:
Even these didn't help:</p>

<pre><code>c:\openssl&gt;gcc -o test test.c  -lssl -lcrypto -Ic:\openssl\include\
c:\openssl&gt;gcc -o test test.c -I c:\openssl\include\ -L c:\openssl\lib -lssl -lcrypto
c:\openssl&gt;gcc -o test test.c -Lc:\openssl\lib -lssl -lcrypto -Ic:\openssl\include\
</code></pre>