none
这个错误什么含义:dll 接口类成员可能不与dll 接口一起声明 RRS feed

全部回复

  • 什么样的代码?什么编译环境?



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP
    2009年12月7日 19:19
    版主
  • 代码如下,“MESQUITE_EXPORT void clear(); “ 出错。在2008下编译。



    class MESQUITE_EXPORT MsqError {
    public:

        /* NOTE: If you add an error to this list, make sure
           a) you add it *before* LAST_ERROR_CODE
           b) you add the corresponding string in MsqError.cpp
         */
        /** \brief Error codes
         */
      enum ErrorCode {
        NO_ERROR          =  0,/**< no error */
        UNKNOWN_ERROR,         /**< unknown error occured */
        OUT_OF_MEMORY,         /**< unable to allocate the necessary memory */
        INVALID_ARG ,          /**< invalid function argument passed */
        NOT_INITIALIZED,       /**< object not initialized */
        INVALID_STATE,         /**< object is in an invalid state */
        FILE_ACCESS,           /**< File cannot be opened/created. */
        FILE_FORMAT,           /**< Wrong file type */
        PARSE_ERROR,           /**< Error parsing input (or input file) */
        IO_ERROR,              /**< An I/O error occured (e.g. read from file failed.) */
        INVALID_MESH,          /**< The mesh is invalid */
        NO_PD_STORAGE_MODE,    /**< no storage mode chosen within PatchData */
        NOT_IMPLEMENTED,       /**< requested functionality is not (yet) implemented */
        INTERNAL_ERROR,        /**< A bug in Mesquite */
        INTERRUPTED,           /**< Application or user interrupted operation */
        TAG_ALREADY_EXISTS,    /**< Attempt to create tag that already exists */
        TAG_NOT_FOUND,         /**< Specified tag does not exist */
        UNSUPPORTED_ELEMENT,   /**< the element type is not supported. */
        LAST_ERROR_CODE
      };
     
      //! \brief resets error object to non-active state (no error).
      MESQUITE_EXPORT void clear();
     
      //! \brief Check if an error has occured
      inline bool error() const       { return NO_ERROR != errorCode; }
      //! \brief Check if an error has occured
      inline operator bool() const    { return NO_ERROR != errorCode; }

      //! \brief Initialize to cleared state.
      MsqError() : errorCode(NO_ERROR) { }
     
      //! Destructor - empty but must declar virtual destrucor if virtual functions.
      virtual ~MsqError();

     /* ************************************************************ *
      *            Low-level access to error data
      * ************************************************************ */ 

      //! Get error code
      inline ErrorCode error_code() const    { return errorCode; }

      //!\class Trace
      //!\brief One line of stack trace data
      struct MESQUITE_EXPORT Trace {
        std::string function;
        std::string file;
        int line;
       
        Trace( const char* fun, const char* fil, int lin )
         : function(fun), file(fil), line(lin) {}
      };
     
      //! Get error message
      const char* error_message() const;
     
      //! Container type used to store stack trace.
      //! Return type for stack()
      typedef std::list<Trace> StackTrace;

      //! Get stack trace
      inline const StackTrace& stack() const { return stackTrace; }


     /* ************************************************************ *
      *                        Set error data
      * ************************************************************ */ 
     
      //! Add to back-trace of call stack.  Called by MSQ_CHKERR.
      //! Must always return true.
      virtual bool push( const char* function, const char* file, int line );
     
      //! Initialize the error object with the passed data.
      virtual bool set_error( ErrorCode num, const char* msg = 0 );
     
      //!\class setter
      //! Used for implementing pre-processor macros for internal use
      //! in Mesquite.
      class MESQUITE_EXPORT Setter {
        public:
          Setter(MsqError& err, const char* function, const char* file, int line)
            : mErr(err), functionName(function), fileName(file), lineNumber(line) {}
         
          bool set( ErrorCode num );
          bool set( const char* message, ErrorCode num );
          bool set( const std::string& message, ErrorCode num );
          bool set( ErrorCode num, const char* format, ... )
          #ifdef __GNUC__
            __attribute__ ((format (printf, 3, 4)))
          #endif
            ; // ending semicolon for set( ErrorCode num, const char* format, ... )
        private:
          MsqError& mErr;
          const char* functionName;
          const char* fileName;
          int lineNumber;
      };

      static inline Setter setter( MsqError& err, const char* function, const char* file, int line )
      { return Setter( err, function, file, line ); }

    private:

      ErrorCode errorCode;
      std::string errorMessage;
      StackTrace stackTrace;
    };

    2009年12月8日 1:21