<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[solved] Error: multiple types ....]]></title><description><![CDATA[<p>Moin Moin,</p>
<p>ich habe da ein kleines Problem und bin recht ratlos.<br />
Ich habe eine Checks Klasse, aber beim Kompilieren bekomme ich immer folgende Fehlermeldung:</p>
<blockquote>
<p>mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -D__GNUWIN32__ -D__WXMSW__ -DUSE_PCH -Wall -IE:\wxWidgets-2.6.2\include -IE:\wxWidgets-2.6.2\lib\gcc_lib\mswu -IE:\wxWidgets-2.6.2\contrib\include -IE:\wxWidgets-2.6.2\sqlite3\include -IE:\wxWidgets-2.6.2\lib\gcc_lib\mswu -IE:\wxWidgets-2.6.2\include -c src\server\checks.cpp -o .\obj\src\server\checks.o<br />
In file included from src\server\checks.cpp:1:<br />
src\server\/checks.h:31: error: multiple types in one declaration</p>
</blockquote>
<p>Der betroffene Code sieht folgendermassen aus:</p>
<pre><code>#ifndef __CHECKS_H__
#define __CHECKS_H__

#include &quot;database.h&quot;
#include &quot;thread.h&quot;
#include &quot;client.h&quot;
#include &quot;log.h&quot;

class Checks : public wxThread
{
public:
    Checks(Database* dbase);
    ~Checks();

    void checkForTimeout();
    void checkForNewOnlineClient();
    void checkForNewOfflineClient();

protected:
    void connect(char* ip, unsigned int port);
    void sendMessage(char* msg);
    void disconnect();

    virtual void* Entry ();
    Database* database;
    Client *client;

private:

};

#endif
</code></pre>
<p>Das tolle ist, Zeile 31 ist diese Stelle &quot;};&quot;</p>
<p>Das lustige ist, wenn ich die Anordnung der Includes verdrehe, dann bekomme ich eine ganz andere, und noch absurdere Fehlermeldung.<br />
Da behauptet der minGW sogar, dass die wxLibs Fehler enthalten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
<p>Welchen Grund kann mein Problem haben?<br />
Ich weiss nicht so recht an welcher Stelle ich suchen soll...</p>
<p>MfG</p>
<p>Vic</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/146265/solved-error-multiple-types</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 15:17:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/146265.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 05 May 2006 20:21:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:48:08 GMT]]></title><description><![CDATA[<p>Moin Moin,</p>
<p>ich habe da ein kleines Problem und bin recht ratlos.<br />
Ich habe eine Checks Klasse, aber beim Kompilieren bekomme ich immer folgende Fehlermeldung:</p>
<blockquote>
<p>mingw32-g++.exe -Wall -pipe -mthreads -Winvalid-pch -D__GNUWIN32__ -D__WXMSW__ -DUSE_PCH -Wall -IE:\wxWidgets-2.6.2\include -IE:\wxWidgets-2.6.2\lib\gcc_lib\mswu -IE:\wxWidgets-2.6.2\contrib\include -IE:\wxWidgets-2.6.2\sqlite3\include -IE:\wxWidgets-2.6.2\lib\gcc_lib\mswu -IE:\wxWidgets-2.6.2\include -c src\server\checks.cpp -o .\obj\src\server\checks.o<br />
In file included from src\server\checks.cpp:1:<br />
src\server\/checks.h:31: error: multiple types in one declaration</p>
</blockquote>
<p>Der betroffene Code sieht folgendermassen aus:</p>
<pre><code>#ifndef __CHECKS_H__
#define __CHECKS_H__

#include &quot;database.h&quot;
#include &quot;thread.h&quot;
#include &quot;client.h&quot;
#include &quot;log.h&quot;

class Checks : public wxThread
{
public:
    Checks(Database* dbase);
    ~Checks();

    void checkForTimeout();
    void checkForNewOnlineClient();
    void checkForNewOfflineClient();

protected:
    void connect(char* ip, unsigned int port);
    void sendMessage(char* msg);
    void disconnect();

    virtual void* Entry ();
    Database* database;
    Client *client;

private:

};

#endif
</code></pre>
<p>Das tolle ist, Zeile 31 ist diese Stelle &quot;};&quot;</p>
<p>Das lustige ist, wenn ich die Anordnung der Includes verdrehe, dann bekomme ich eine ganz andere, und noch absurdere Fehlermeldung.<br />
Da behauptet der minGW sogar, dass die wxLibs Fehler enthalten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
<p>Welchen Grund kann mein Problem haben?<br />
Ich weiss nicht so recht an welcher Stelle ich suchen soll...</p>
<p>MfG</p>
<p>Vic</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051791</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051791</guid><dc:creator><![CDATA[_Vic_]]></dc:creator><pubDate>Fri, 05 May 2006 20:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:32:58 GMT]]></title><description><![CDATA[<p>Kann es sein, dass wxThread nicht da ist? Wie sehen denn die anderen Header aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051794</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051794</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Fri, 05 May 2006 20:32:58 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:35:30 GMT]]></title><description><![CDATA[<p>Doch wxThread ist da. Ich habe das nur in der Thread.h inkludiert</p>
<p>Die Header sehen folgendermassen aus:</p>
<pre><code>#ifndef __DATABASE_H__
#define __DATABASE_H__

#include &quot;CppSQLite3.h&quot;
#include &quot;log.h&quot;

class Database
{
public:
    Database();
    Database(char* dbpath);
    ~Database();

    void open(char* dbpath);
    void close();

    bool exists(char* table);

    CppSQLite3Table query (char* command);
    void exec (char* command);

    bool is_locked();

protected:
    CppSQLite3DB db;
    bool locked;

private:
};

#endif
</code></pre>
<pre><code>#ifndef __THREAD_H__
#define __THREAD_H__

#include &lt;wx/thread.h&gt;

static wxMutex *mutex;

#endif
</code></pre>
<pre><code>#ifndef __CLIENT_H__
#define __CLIENT_H__

#include &lt;wx/wx.h&gt;
#include &lt;wx/socket.h&gt;
#include &quot;log.h&quot;

class Client : public wxEvtHandler
{
public:
    Client();
    ~Client();

    void connect(char* ip, unsigned int port);
    void sendMessage(char* msg);
    void disconnect();

protected:
    void OnSocketEvent(wxSocketEvent &amp;event);
    wxSocketClient *client;

private:
    DECLARE_EVENT_TABLE()

};

enum
{
    CLIENT_SOCKET_ID = 300
}
#endif
</code></pre>
<pre><code>#ifndef __LOG_H__
#define __LOG_H__

#include &lt;fstream&gt;
#include &quot;wx/wx.h&quot;
#include &quot;wx/datetime.h&quot;

using namespace std;

class Log
{
public:
      Log();
      Log (wxString path);
      ~Log();

      int writefile (wxString message);

protected:
      int openfile ();
      int closefile ();

private:
      wxString get_logpath ();
      void set_logpath (wxString value);

private:
      wxString logpath;
      ofstream logfile;
};

inline wxString Log::get_logpath ()
{
  return logpath;
}

inline void Log::set_logpath (wxString value)
{
  logpath = value;
}

void addLog(wxString message);
void addLog(char* klasse, char* methode, char* message);

#endif
[code]

MfG

Vic
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1051796</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051796</guid><dc:creator><![CDATA[_Vic_]]></dc:creator><pubDate>Fri, 05 May 2006 20:35:30 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:40:29 GMT]]></title><description><![CDATA[<p>Hmm,<br />
bin ein bisschen weiter.</p>
<p>Wenn ich alle Verbindungen zur client.h kappe, dann wird die checks.h richtig kompiliert...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051803</guid><dc:creator><![CDATA[_Vic_]]></dc:creator><pubDate>Fri, 05 May 2006 20:40:29 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:44:54 GMT]]></title><description><![CDATA[<p>Schau mal in der Clients.h, hinter dem enum {...} fehlt ein Semikolon. Enums sind auch Typen, für die gilt dasselbe wie für Klassen.</p>
<p>(Und benutz bitte cpp statt code Tags)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051807</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051807</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Fri, 05 May 2006 20:44:54 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:47:00 GMT]]></title><description><![CDATA[<p>ARGH!<br />
Danke das wars<br />
Und dieses Ding hat mich jetzt 3 h gekostet...</p>
<p>MfG</p>
<p>Vic</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051810</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051810</guid><dc:creator><![CDATA[_Vic_]]></dc:creator><pubDate>Fri, 05 May 2006 20:47:00 GMT</pubDate></item><item><title><![CDATA[Reply to [solved] Error: multiple types .... on Fri, 05 May 2006 20:48:27 GMT]]></title><description><![CDATA[<p>Was benutzt du auch globale Enums :p. Ich wette, wenn das in nem Namespace gewesen wäre, hätte der Compiler an &quot;richtigerer&quot; Stelle gemeckert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051813</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Fri, 05 May 2006 20:48:27 GMT</pubDate></item></channel></rss>