Note that there are some explanatory texts on larger screens.

plurals
  1. POnewer gcc gives illegal syntax error in a header file
    text
    copied!<p>I've installed the <a href="http://www.codesink.org/mimetic_mime_library.html" rel="nofollow">mimetic</a> library according to the INSTALL instructions. the following main file compiles without a problem with a <code>gcc-c++ 4.1.2</code>, but when I upgrade to <code>gcc-c++ 4.4.7</code> I get an error.</p> <blockquote> <p>mimetic.cpp:</p> </blockquote> <pre><code>#include &lt;iostream&gt; #include &lt;mimetic.h&gt; using namespace std; using namespace mimetic; int main() { MimeEntity me; return 0; } </code></pre> <p>error</p> <pre><code>In file included from /usr/local/include/mimetic/rfc822/header.h:18, from /usr/local/include/mimetic/header.h:11, from /usr/local/include/mimetic/mimetic.h:18, from mimetic.cpp:2: /usr/local/include/mimetic/rfc822/messageid.h:29: error: expected ‘)’ before ‘thread_id’ </code></pre> <p>the header file: rfc822/messageid.h</p> <pre><code>#ifndef _MIMETIC_MESSAGEID_H_ #define _MIMETIC_MESSAGEID_H_ #ifdef HAVE_STDINT_H #include &lt;stdint.h&gt; #endif #include &lt;string&gt; #include &lt;mimetic/libconfig.h&gt; #ifdef HAVE_INTTYPES_H #include &lt;inttypes.h&gt; #endif #include &lt;mimetic/utils.h&gt; #include &lt;mimetic/os/utils.h&gt; #include &lt;mimetic/rfc822/fieldvalue.h&gt; namespace mimetic { /// Message-ID field value /// On Win32 Winsock library must be initialized before using this class. struct MessageId: public FieldValue { MessageId(uint32_t thread_id = 0 ); // &lt;------ line 29 MessageId(const std::string&amp;); std::string str() const; void set(const std::string&amp;); protected: FieldValue* clone() const; private: static unsigned int ms_sequence_number; std::string m_msgid; }; } #endif </code></pre> <p>is there some compatibility switch for the gcc ?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload