-1

フィンガープリント マシンで win7 ロギング アプリケーションを作成しています。フィンガープリント マシン SDK は UFScanner.h ヘッダー ファイルを提供します。.cpp コードで「UFS_STATUS」を使用しようとすると、次のエラーが表示されます。

エラー 1 エラー C4430: 型指定子がありません - int が想定されています。注: C++ は default-int をサポートしていません

エラー 2 エラー C2086: 'int ufs_res': 再定義

 

    #ifndef _UFSCANNER_H_
    #define _UFSCANNER_H_
    #define __extension__

    #ifdef UFS_EXPORTS
    #define UFS_API __declspec(dllexport) __stdcall
    #else
    #define UFS_API __stdcall
    #endif
    #define UFS_CALLBACK __stdcall

    #ifdef __cplusplus
    extern "C" {
    #endif


    // Status Definition
    #define UFS_STATUS               int

    // Status Return Values
    #define UFS_OK                  0
    #define UFS_ERROR               -1
    #define UFS_ERR_NO_LICENSE          -101
    #define UFS_ERR_LICENSE_NOT_MATCH       -102
    #define UFS_ERR_LICENSE_EXPIRED         -103
    #define UFS_ERR_NOT_SUPPORTED           -111
    #define UFS_ERR_INVALID_PARAMETERS      -112
    ...

そして .cpp コード:

 

    #include 
    #include 
    #ifndef WIN32_NO_STATUS
    #include 
    #define WIN32_NO_STATUS
    #endif
    #include 
    #include "CSampleCredential.h"
    #include "guid.h"
    #include "windows.h"

    #include "UFScanner.h"
    #define __extension__

    #define TEMPLATE_SIZE 384

    UFS_STATUS ufs_res;
    int nScannerNumber;

    ufs_res = UFS_Init(); //ufs_res gives error : this declaration has no storage class or type specifier

...
4

1 に答える 1