<?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[Komischer Fehler!]]></title><description><![CDATA[<p>Hallo.<br />
Wenn ich ein Programm kompilieren will, dann kommt immer dieser Fehler:</p>
<pre><code>cannot declare variable `receiver' to be of type `CEventReceiver_eg2' 
because the following virtual functions are abstract: 
virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&amp;)
</code></pre>
<p>Ich hab schon gesucht, und man hat mir gesagt, das ich eine zu alte version von Irrlicht beitz. Und Tatsächlich. Aber trotz der Neuen Version (1.4.2) wird der Fehler nicht behoben.</p>
<p>Kennt ihr eine Lösung?</p>
<p>lg Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/230837/komischer-fehler</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 03:13:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/230837.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 02 Jan 2009 19:30:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 19:30:27 GMT]]></title><description><![CDATA[<p>Hallo.<br />
Wenn ich ein Programm kompilieren will, dann kommt immer dieser Fehler:</p>
<pre><code>cannot declare variable `receiver' to be of type `CEventReceiver_eg2' 
because the following virtual functions are abstract: 
virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&amp;)
</code></pre>
<p>Ich hab schon gesucht, und man hat mir gesagt, das ich eine zu alte version von Irrlicht beitz. Und Tatsächlich. Aber trotz der Neuen Version (1.4.2) wird der Fehler nicht behoben.</p>
<p>Kennt ihr eine Lösung?</p>
<p>lg Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638517</guid><dc:creator><![CDATA[CaPGeti]]></dc:creator><pubDate>Fri, 02 Jan 2009 19:30:27 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 19:35:04 GMT]]></title><description><![CDATA[<p>Mit ein bisschen Code könnte man dir vielleicht besser helfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638518</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638518</guid><dc:creator><![CDATA[freaky]]></dc:creator><pubDate>Fri, 02 Jan 2009 19:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 19:42:24 GMT]]></title><description><![CDATA[<p>Klar.</p>
<p>Ich hab den Code nicht selber geschrieben. Aber hier ird versucht eine Klasse zu erstellen, welche die Events abfängt...Mausklicks und so...</p>
<pre><code>class CEventReceiver_eg2 : public IEventReceiver
{
    // MausEventAbfragen etc...
}
</code></pre>
<p>Wie schon gesagt, arbeite ich mit Irrlicht und Newton SDK mit IPhysics als wrapper.<br />
Die Instanz tu ich so erstellen:</p>
<pre><code>CEventReceiver_eg2 receiver(smgr, &amp;physics, camera);
</code></pre>
<p>Und so sieht die Klasse EventReceiver aus:</p>
<blockquote>
<p>class IEventReceiver<br />
{<br />
public:<br />
virtual ~IEventReceiver() {}<br />
virtual bool OnEvent(const SEvent&amp; event) = 0;<br />
};</p>
</blockquote>
<p>Hilft das was euch, oder wollt ihr es GANZ genau <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p>lg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638520</guid><dc:creator><![CDATA[CaPGeti]]></dc:creator><pubDate>Fri, 02 Jan 2009 19:42:24 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 19:52:16 GMT]]></title><description><![CDATA[<p>Hm zeig mal den Konstruktor von <em>CEventReceiver_eg2</em>.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638523</guid><dc:creator><![CDATA[freaky]]></dc:creator><pubDate>Fri, 02 Jan 2009 19:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 19:55:00 GMT]]></title><description><![CDATA[<p>Hier:</p>
<blockquote>
<p>CEventReceiver_eg2(ISceneManager* sceneManager, CPhysics* physics, ICameraSceneNode* camera)<br />
{<br />
m_sceneManager = sceneManager;<br />
m_physics = physics;<br />
m_camera = camera;<br />
}</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1638525</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638525</guid><dc:creator><![CDATA[CaPGeti]]></dc:creator><pubDate>Fri, 02 Jan 2009 19:55:00 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 19:55:27 GMT]]></title><description><![CDATA[<p>OnEvent ist virtual und wurde nicht Implementiert. Du musst eine abgeleitete Klasse schreiben die dies implementiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638526</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638526</guid><dc:creator><![CDATA[Fencer]]></dc:creator><pubDate>Fri, 02 Jan 2009 19:55:27 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 20:00:43 GMT]]></title><description><![CDATA[<p>Meinst du sowas?</p>
<pre><code>bool OnEvent(SEvent event)
	{
		if(event.EventType == EET_MOUSE_INPUT_EVENT)
		{
			if(event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
			{
				m_physics-&gt;dropTestCube(m_sceneManager, m_camera-&gt;getPosition(), 2.0f, 10.0f);
			}
			else if(event.MouseInput.Event == EMIE_RMOUSE_PRESSED_DOWN)
			{
				m_physics-&gt;dropTestSphere(m_sceneManager, m_camera-&gt;getPosition(), 2.0f, 10.0f);
			}
		}
		return false;
	}
</code></pre>
<p>Das ist schon da.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638529</guid><dc:creator><![CDATA[CaPGeti]]></dc:creator><pubDate>Fri, 02 Jan 2009 20:00:43 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Fri, 02 Jan 2009 22:19:56 GMT]]></title><description><![CDATA[<p>CaPGeti schrieb:</p>
<blockquote>
<p>Meinst du sowas?</p>
<pre><code>bool OnEvent(SEvent event)
	{
		if(event.EventType == EET_MOUSE_INPUT_EVENT)
		{
			if(event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
			{
				m_physics-&gt;dropTestCube(m_sceneManager, m_camera-&gt;getPosition(), 2.0f, 10.0f);
			}
			else if(event.MouseInput.Event == EMIE_RMOUSE_PRESSED_DOWN)
			{
				m_physics-&gt;dropTestSphere(m_sceneManager, m_camera-&gt;getPosition(), 2.0f, 10.0f);
			}
		}
		return false;
	}
</code></pre>
<p>Das ist schon da.</p>
</blockquote>
<p>Du schreibst dir schon selber die Antwort auf dein Problem <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>CaPGeti schrieb:</p>
<blockquote>
<p>Hallo.<br />
Wenn ich ein Programm kompilieren will, dann kommt immer dieser Fehler:</p>
<pre><code>cannot declare variable `receiver' to be of type `CEventReceiver_eg2' 
because the following virtual functions are abstract: 
[b]virtual bool irr::IEventReceiver::OnEvent(const irr::SEvent&amp;)[/b]
</code></pre>
</blockquote>
<p>Du hast also der Methode eine falsche Signatur gegeben. Es sollte gehen mit</p>
<pre><code class="language-cpp">bool OnEvent(const SEvent &amp;event)
{
   //blabla
}
</code></pre>
<p>Felix</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1638591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1638591</guid><dc:creator><![CDATA[Phoemuex]]></dc:creator><pubDate>Fri, 02 Jan 2009 22:19:56 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Sat, 03 Jan 2009 21:29:59 GMT]]></title><description><![CDATA[<p>Danke ^^<br />
Komischer fehler halt.</p>
<p>Ich will euch ja nicht die zeit rauben, aber nachdem das behoben war kamen wieder fehler.... an die 10 stück.<br />
Alles Linker errors....ZB:</p>
<pre><code>[Linker error] undefined reference to `CPhysics::CPhysics()'
</code></pre>
<p>Ich denk mal er kann von der klasse CPhysics nicht die funktion ( in diesem fall Konstruktor (?)) CPhysics nicht finden.</p>
<p>Ich habe</p>
<pre><code>#include &lt;IPhysics.h&gt;
</code></pre>
<p>eingebunden.<br />
In dieser Datei wird eine weiter Datei eingebunden.</p>
<pre><code>#include &lt;CPhysics.h&gt;
</code></pre>
<p>In dieser befindet sich letzten endes diese Klasse.</p>
<p>Hier steht folgendes:</p>
<pre><code>#ifndef __CPhysics_h
#define __CPhysics_h

#include &quot;PhysicsGlobal.h&quot;
#include &quot;SPhysicsStructs.h&quot;
#include &quot;CPhysicsEntity.h&quot;
#include &quot;MPhysicsCallbacks.h&quot;
#include &quot;IPhysicsEntity.h&quot;
#include &quot;EPhysicsEnums.h&quot;

#include &quot;CPhysicsCar.h&quot;

/// Root class.
/// All functionality for IPhysics is accessed through this class.
class CPhysics
{
public:
	CPhysics(); 
	~CPhysics();
	void init(ITimer* timer);
	void update();
	void update(f32 timestep_ms);
	void close();
	NewtonWorld *getWorld();
	IPhysicsEntity* addEntity(SPhysicsCube* cube);
	IPhysicsEntity* addEntity(SPhysicsSphere* sphere);
	IPhysicsEntity* addEntity(SPhysicsTerrain* terrain);
	IPhysicsEntity* addEntity(SPhysicsStaticMesh* staticMesh);
	IPhysicsCar* addCar(SPhysicsCar *car);
	IPhysicsEntity* dropTestCube(ISceneManager* smgr, vector3df fromPosition);
	IPhysicsEntity* dropTestCube(ISceneManager* smgr, vector3df fromPosition, f32 size, f32 mass);
	IPhysicsEntity* dropTestSphere(ISceneManager* smgr, vector3df fromPosition);
	IPhysicsEntity* dropTestSphere(ISceneManager* smgr, vector3df fromPosition, f32 size, f32 mass);
	void setUpdateMode(PHYSICS_UPDATE_MODE updateMode);
	void setUpdatesPerSecond(s32 updatesPerSecond);
	void setWorldSize(vector3df sizeMin, vector3df sizeMax);
private:
	IPhysicsEntity* setUpRigidBody(NewtonBody *body, SPhysicsAttributes* attributes);
	void addMeshToTreeCollisionStandard(IMeshBuffer* meshBuffer, NewtonCollision* treeCollision, SPhysicsStaticMesh* staticMesh);
	void addMeshToTreeCollision2TCoords(IMeshBuffer* meshBuffer, NewtonCollision* treeCollision, SPhysicsStaticMesh* staticMesh);
	void addMeshToTreeCollisionTangents(IMeshBuffer* meshBuffer, NewtonCollision* treeCollision, SPhysicsStaticMesh* staticMesh);
	NewtonWorld *m_world;
	list&lt;IPhysicsBaseEntity*&gt; m_entityList;
	// timestep stuff
	f32 m_timestepAccumulator;
	ITimer* m_timer;
	f32 m_oldTime;
	PHYSICS_UPDATE_MODE m_updateMode;
	s32 m_updatesPerSecond;

};

#endif
</code></pre>
<p>Aber warum kommt dennoch dieser fehler (siehe oben) ???<br />
lg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1639024</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1639024</guid><dc:creator><![CDATA[CaPGeti]]></dc:creator><pubDate>Sat, 03 Jan 2009 21:29:59 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Sat, 03 Jan 2009 21:45:48 GMT]]></title><description><![CDATA[<p>du musst noch eine lib-Datei einbinden. irgendwas wie libphysics.a oder sowas ähnlcihes.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1639027</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1639027</guid><dc:creator><![CDATA[Maxi]]></dc:creator><pubDate>Sat, 03 Jan 2009 21:45:48 GMT</pubDate></item><item><title><![CDATA[Reply to Komischer Fehler! on Sat, 03 Jan 2009 21:52:41 GMT]]></title><description><![CDATA[<p>ich hab hier noch ein</p>
<pre><code>#pragma comment(lib, &quot;IPhysics.lib&quot;)
</code></pre>
<p>in der main.... Aber ansonsten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1639028</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1639028</guid><dc:creator><![CDATA[CaPGeti]]></dc:creator><pubDate>Sat, 03 Jan 2009 21:52:41 GMT</pubDate></item></channel></rss>