私は新しいコーディングについてこの問題があります: openMPとopenSSLを使用するCプログラムをコンパイルする必要があります。あなたがあなた自身のソフトウェアを構築し、それがこの式を必要とする場合、あなたは は、ビルド変数に追加する必要がありますHomebrew OpenSSLとOpenMPを使用したOS Xでのリンクエラー
:私はこれを取得して自作を使用してOpenSSLをインストールし
LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include
、その後、I次のコマンド
gcc-4.9 -std=c99 -fopenmp main.c -L/usr/local/opt/openssl/lib -lssl
を使用し、私は、次のエラーを取得
Undefined symbols for architecture x86_64: "_CRYPTO_free", referenced from:
_openmp_thread_cleanup in ccESSonD.o "_CRYPTO_malloc", referenced from:
_openmp_thread_setup in ccESSonD.o "_CRYPTO_num_locks", referenced from:
_openmp_thread_setup in ccESSonD.o
_openmp_thread_cleanup in ccESSonD.o "_CRYPTO_set_id_callback", referenced from:
_openmp_thread_setup in ccESSonD.o
_openmp_thread_cleanup in ccESSonD.o "_CRYPTO_set_locking_callback", referenced from:
_openmp_thread_setup in ccESSonD.o
_openmp_thread_cleanup in ccESSonD.o "_ERR_free_strings", referenced from:
_cleanup_EVP in ccESSonD.o "_ERR_load_crypto_strings", referenced from:
_init_EVP in ccESSonD.o "_ERR_print_errors_fp", referenced from:
_handleErrors in ccESSonD.o "_EVP_CIPHER_CTX_cleanup", referenced from:
_getAllRandomness in ccESSonD.o "_EVP_CIPHER_CTX_init", referenced from:
_setupAES in ccESSonD.o "_EVP_EncryptInit_ex", referenced from:
_setupAES in ccESSonD.o "_EVP_EncryptUpdate", referenced from:
_getAllRandomness in ccESSonD.o "_EVP_aes_128_ctr", referenced from:
_setupAES in ccESSonD.o "_EVP_cleanup", referenced from:
_cleanup_EVP in ccESSonD.o "_OPENSSL_add_all_algorithms_noconf", referenced from:
_init_EVP in ccESSonD.o "_OPENSSL_config", referenced from:
_init_EVP in ccESSonD.o "_RAND_bytes", referenced from:
_main in ccESSonD.o "_SHA256_Final", referenced from:
_H in ccESSonD.o
_H3 in ccESSonD.o "_SHA256_Init", referenced from:
_H in ccESSonD.o
_H3 in ccESSonD.o "_SHA256_Update", referenced from:
_H in ccESSonD.o
_H3 in ccESSonD.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status
私は間違っていましたか?