嘗試openssl的c代碼,並在命令提示符下編譯時出現此錯誤。「在Windows上使用OpenSSL時找不到-lcrypto -lssl」(使用MinGW)
c:\openssl>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
現在我該怎麼做,請幫助。
編輯: 即使這些並沒有幫助:
c:\openssl>gcc -o test test.c -lssl -lcrypto -Ic:\openssl\include\
c:\openssl>gcc -o test test.c -I c:\openssl\include\ -L c:\openssl\lib -lssl -lcrypto
c:\openssl>gcc -o test test.c -Lc:\openssl\lib -lssl -lcrypto -Ic:\openssl\include\
@iharob「只是使用不同的平臺」不是一個有生產力的評論。 – fuz
[將OpenSSL庫鏈接到程序]可能的重複(http://stackoverflow.com/questions/4352573/linking-openssl-libraries-to-a-program)和[無法鏈接OpenSSL代碼](http:///stackoverflow.com/q/11004314)。 – jww
@ mikedu95是的,我安裝它:http://stackoverflow.com/questions/11896304/openssl-is-not-recognized-as-an-internal-or-external-command –