我找到了本網站的一個問題的答案,我試圖從here實現。安裝了OpenSSL,沒有openssl.h文件
我從here下載並安裝了openssl。我執行提取文件中的安裝文本中提到的每個步驟。
$ ./config中 $使 $使測試 $ make install的
這些都完成後沒有錯誤。然後,當我試圖編譯如何使用從回答問題的示例代碼生成SHA哈希碼的代碼,我給出以下錯誤:
致命錯誤:openssl.h:沒有這樣的文件或目錄
我是否需要做更多的事情來創建openssl頭文件,正如我在安裝openssl之後所想的那樣,沒有任何問題它會自動創建?這是我第一次爲C添加一個庫,所以請原諒我的任何天真。
感謝您的閱讀。
您是否在編譯過程中使用-I選項指定了包含文件的目錄?(我假設您在Unix上) – Specksynder