www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Error: voids have no value...

reply "Robert M. Münch" <robert.muench robertmuench.de> writes:
Hi, I get this error here:

//
//  The Engine will call this function in the viewer to pass in
//  setup information
//
extern "C" {
    void DllExport dtsSetupViewer(
                                ^
d:\develop\dtsearch\include\dtsviewr.h(410) : Error: voids have no value;
ctors, dtors and invariants have no return value

    void DllExport dtsSetupViewer(dtsViewerSetupInfo& info);
    }

Here is the declaration of "dtsViewerSetupInfo":

struct dtsViewerSetupInfo {
    void (*logMessage)(const char *str);  // adds a string to the dtSearch
debug log
    long lzwEnableCode;
    dtsEngineFunctions *engineFunctions;
    long flags;
    long engineBuild;
    long reserved[15];
    void setFlag(long f, int fOn) {
        if (fOn)
            flags |= f;
        else
            flags &= (~f);
        }
    int checkFlag(long f) {
        return flags & f;
        }

    // Reserved for internal use
    dtsAlphabet *alphabet;
    dtsViewerSetupInfo();
    };

Does anybody know what the problem is? To which void is the compiler
referring? To the return value? Somehow I have the feeling that this doesn't
has to do with the struct at all...

--
Robert M. Münch
IT & Management Freelancer
Mobile: +49 (0)177 2452 802
Fax   : +49 (0)721 8408 9112
Web   : http://www.robertmuench.de
Nov 11 2002
parent reply "Walter" <walter digitalmars.com> writes:
It could be that the "DllExport" is not defined anywhere. -Walter

"Robert M. Münch" <robert.muench robertmuench.de> wrote in message
news:aqop50$uaq$1 digitaldaemon.com...
 Hi, I get this error here:

 //
 //  The Engine will call this function in the viewer to pass in
 //  setup information
 //
 extern "C" {
     void DllExport dtsSetupViewer(
                                 ^
 d:\develop\dtsearch\include\dtsviewr.h(410) : Error: voids have no value;
 ctors, dtors and invariants have no return value

     void DllExport dtsSetupViewer(dtsViewerSetupInfo& info);
     }

 Here is the declaration of "dtsViewerSetupInfo":

 struct dtsViewerSetupInfo {
     void (*logMessage)(const char *str);  // adds a string to the dtSearch
 debug log
     long lzwEnableCode;
     dtsEngineFunctions *engineFunctions;
     long flags;
     long engineBuild;
     long reserved[15];
     void setFlag(long f, int fOn) {
         if (fOn)
             flags |= f;
         else
             flags &= (~f);
         }
     int checkFlag(long f) {
         return flags & f;
         }

     // Reserved for internal use
     dtsAlphabet *alphabet;
     dtsViewerSetupInfo();
     };

 Does anybody know what the problem is? To which void is the compiler
 referring? To the return value? Somehow I have the feeling that this
doesn't
 has to do with the struct at all...

 --
 Robert M. Münch
 IT & Management Freelancer
 Mobile: +49 (0)177 2452 802
 Fax   : +49 (0)721 8408 9112
 Web   : http://www.robertmuench.de
Nov 11 2002
parent "Robert M. Münch" <robert.muench robertmuench.de> writes:
"Walter" <walter digitalmars.com> schrieb im Newsbeitrag
news:aqotl8$134f$2 digitaldaemon.com...
 It could be that the "DllExport" is not defined anywhere. -Walter
Thanks, that was the problem because it was wrapped in a _MSC_VER define. Robert
Nov 12 2002