Cプログラムでaprを使用しており、appr_error.hヘッダーファイルをインクルードしていますが、ビルド中にエラーが発生します。
関数「APR_DECLARE」の場合:エラー:「apr_strerror」の前に宣言指定子が必要です</ p>
ヘッダーファイルの問題のある行は次のとおりです。
/**
* Return a human readable string describing the specified error.
* @param statcode The error code the get a string for.
* @param buf A buffer to hold the error string.
* @param bufsize Size of the buffer to hold the string.
*/
APR_DECLARE(char *) apr_strerror(apr_status_t statcode, char *buf,
apr_size_t bufsize);
このヘッダーファイルには、次のようにAPR_DECLAREの#defineを持つヘッダーファイルが含まれています。
#if !defined(WIN32)
368 /**
369 * The public APR functions are declared with APR_DECLARE(), so they may
370 * use the most appropriate calling convention. Public APR functions with
371 * variable arguments must use APR_DECLARE_NONSTD().
372 *
373 * @deffunc APR_DECLARE(rettype) apr_func(args);
374 */
375 #define APR_DECLARE(type) type
なぜこのエラーメッセージが表示されるのか混乱しています-何かアイデアはありますか?