Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
から「プリコンパイル済みヘッダーを使用する」オプションを削除しましたcrypto.c。
crypto.c
このエラーを適切に解決するにはどうすればよいですか?
次のように、ヘッダー ファイルでcrypt()関数を宣言する必要があります。extern "C"
crypt()
extern "C"
#ifdef __cplusplus extern "C" { #endif void crypt(unsigned int *, unsigned int, unsigned int *); #ifdef __cplusplus } #endif
そうしないと、C++ コンパイラはそれを (C ではなく) C++ リンケージを持つ関数として扱い、名前マングリングを適用します。