Я новичок в кодировании, и у меня есть эта проблема: Мне нужно скомпилировать программу на C, которая использует openMP и openSSL. Я установил OpenSSL с помощью Homebrew получает это:Ошибка ссылки на OS X с использованием Homebrew OpenSSL и OpenMP
Если вы строите свое собственное программное обеспечение, и это требует этой формулы, вы необходимости добавления в переменных сборки:
LDFLAGS: -L/usr/local/opt/openssl/lib CPPFLAGS: -I/usr/local/opt/openssl/include
, а затем я использовали следующую команду
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
Что я совершил неправильно ?????