QT/OpenGL Problem

Verschiedenes zu Qt
KravenZ
Beiträge: 26
Registriert: 14. November 2006 16:33

Beitrag von KravenZ »

Jetzt wollte ich mal die Definitionen auch in die Header reinpacken um wenigstens etwas weiterarbeiten zu können aber dann erhalte ich auch eine Fehlermerldung.
Hier erstmal die Headerdatei:

Code: Alles auswählen

#ifndef _MY_VECTOR3DF_HH_
#define _MY_VECTOR3DF_HH_
#include <math.h>

class MyVector3Df
{
private:
	float m_x, m_y, m_z;	// Vektorkomponenten
public:
	// Konsturktor(en)
	MyVector3Df();
	MyVector3Df(const MyVector3Df & v);
	MyVector3Df(const float, const float, const float);

	// Zugriffsmethoden

	inline float 	x();
	inline float 	y();
	inline float 	z();
	inline void	setX(float);
	inline void	setY(float);
	inline void	setZ(float);


	// Operatoren

	// arithmetische Operatoren
	inline MyVector3Df operator + (const MyVector3Df & v); // Komponentenweise
	inline MyVector3Df operator - (const MyVector3Df & v); // Komponentenweise
	inline MyVector3Df operator * (const MyVector3Df & v); // Komponentenweise
	inline MyVector3Df operator / (const MyVector3Df & v); // Komponentenweise
	inline MyVector3Df operator * (const float f);	  // Skalarmultiplikation
	friend MyVector3Df operator * (const float f, const MyVector3Df & v);
	inline MyVector3Df operator / (const float f);	  // Skalardivision

	// Zuweisungsoperatoren
	MyVector3Df& operator  = (const MyVector3Df & v);
	MyVector3Df& operator += (const MyVector3Df & v);
	MyVector3Df& operator -= (const MyVector3Df & v);
	MyVector3Df& operator *= (const MyVector3Df & v);
	MyVector3Df& operator /= (const MyVector3Df & v);
	
	// Vergleichsoperatoren
	bool operator == (const MyVector3Df & v);
	bool operator != (const MyVector3Df & v);


	// Methoden
	inline float length();		// liefert Vektorlänge
	inline float lengthSq();	// liefert Vektorlänge²


};	
	inline MyVector3Df operator * (const float f, const MyVector3Df & v);


MyVector3Df::MyVector3Df()
{
}

MyVector3Df::MyVector3Df(const MyVector3Df & v) : m_x(v.m_x), m_y(v.m_y), m_z(v.m_z)
{
}

MyVector3Df::MyVector3Df(const float x, 
			 const float y, 
			 const float z) : m_x(x), m_y(y), m_z(z)
{
}

float MyVector3Df::x()
{
	return m_x;
}

float MyVector3Df::y()
{
	return m_y;
}

float MyVector3Df::z()
{
	return m_z;
}

void  MyVector3Df::setX(float nX)
{
	m_x = nX;
}

void  MyVector3Df::setY(float nY)
{
	m_y = nY;
}

void  MyVector3Df::setZ(float nZ)
{
	m_z = nZ;
}

MyVector3Df MyVector3Df::operator + (const MyVector3Df & v)
{
	return MyVector3Df(m_x + v.m_x,
			    m_y + v.m_y,
			    m_z + v.m_z);
}

MyVector3Df MyVector3Df::operator - (const MyVector3Df & v)
{
	return MyVector3Df(m_x - v.m_x,
			    m_y - v.m_y,
			    m_z - v.m_z);
}

MyVector3Df MyVector3Df::operator * (const MyVector3Df & v)
{
	return MyVector3Df(m_x * v.m_x,
			    m_y * v.m_y,
			    m_z * v.m_z);
}

MyVector3Df MyVector3Df::operator / (const MyVector3Df & v)
{
	return MyVector3Df(m_x / v.m_x,
			    m_y / v.m_y,
			    m_z / v.m_z);
}

MyVector3Df MyVector3Df::operator * (const float f)
{
	return MyVector3Df(m_x * f,
			    m_y * f,
			    m_z * f);
}

MyVector3Df operator * (const float f, const MyVector3Df & v)
{
	return MyVector3Df(v.m_x * f,
			    v.m_y * f,
			    v.m_z * f);
}

MyVector3Df MyVector3Df::operator / (const float f)
{
	return MyVector3Df(m_x / f,
			    m_y / f,
			    m_z / f);
}

MyVector3Df& MyVector3Df::operator  = (const MyVector3Df & v)
{
	m_x = v.m_x;
	m_y = v.m_y;
	m_z = v.m_z;

	return *this;
}

MyVector3Df& MyVector3Df::operator += (const MyVector3Df & v)
{
	m_x += v.m_x;
	m_y += v.m_y;
	m_z += v.m_z;

	return *this;
}

MyVector3Df& MyVector3Df::operator -= (const MyVector3Df & v)
{
	m_x -= v.m_x;
	m_y -= v.m_y;
	m_z -= v.m_z;

	return *this;
}

MyVector3Df& MyVector3Df::operator *= (const MyVector3Df & v)
{
	m_x *= v.m_x;
	m_y *= v.m_y;
	m_z *= v.m_z;

	return *this;
}

MyVector3Df& MyVector3Df::operator /= (const MyVector3Df & v)
{
	m_x /= v.m_x;
	m_y /= v.m_y;
	m_z /= v.m_z;

	return *this;
}

bool MyVector3Df::operator == (const MyVector3Df & v)
{
	return (m_x == v.m_x) && (m_y == v.m_y) && (m_y == v.m_z);
}

bool MyVector3Df::operator != (const MyVector3Df & v)
{
	return (m_x != v.m_x) || (m_y != v.m_y) || (m_y != v.m_z);
}

float MyVector3Df::length()
{
	return sqrtf(m_x*m_x + m_y*m_y + m_z*m_z);	
}
	
float MyVector3Df::lengthSq()
{
	return m_x*m_x + m_y*m_y + m_z*m_z;
}

#endif
Und hier die Fehlermeldung

Code: Alles auswählen

/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/usr/lib/qt3/include/qglist.h:150: first defined here
myvector3df.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: first defined here
myvector3df.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
myvector3df.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
myvector3df.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
myvector3df.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
myvector3df.o: In function `MyVector3Df::operator=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: multiple definition of `MyVector3Df::operator=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: first defined here
myvector3df.o: In function `MyVector3Df::operator+=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: multiple definition of `MyVector3Df::operator+=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: first defined here
myvector3df.o: In function `MyVector3Df::operator-=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: multiple definition of `MyVector3Df::operator-=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: first defined here
myvector3df.o: In function `MyVector3Df::operator*=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: multiple definition of `MyVector3Df::operator*=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: first defined here
myvector3df.o: In function `MyVector3Df::operator/=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: multiple definition of `MyVector3Df::operator/=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: first defined here
myvector3df.o: In function `MyVector3Df::operator==(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: multiple definition of `MyVector3Df::operator==(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: first defined here
myvector3df.o: In function `MyVector3Df::operator!=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: multiple definition of `MyVector3Df::operator!=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: first defined here
OGLWidget.o: In function `MyVector3Df':
/usr/lib/qt3/include/qglist.h:150: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/usr/lib/qt3/include/qglist.h:150: first defined here
OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: first defined here
OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
OGLWidget.o: In function `MyVector3Df::operator=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: multiple definition of `MyVector3Df::operator=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: first defined here
OGLWidget.o: In function `MyVector3Df::operator+=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: multiple definition of `MyVector3Df::operator+=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: first defined here
OGLWidget.o: In function `MyVector3Df::operator-=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: multiple definition of `MyVector3Df::operator-=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: first defined here
OGLWidget.o: In function `MyVector3Df::operator*=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: multiple definition of `MyVector3Df::operator*=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: first defined here
OGLWidget.o: In function `MyVector3Df::operator/=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: multiple definition of `MyVector3Df::operator/=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: first defined here
OGLWidget.o: In function `MyVector3Df::operator==(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: multiple definition of `MyVector3Df::operator==(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: first defined here
OGLWidget.o: In function `MyVector3Df::operator!=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: multiple definition of `MyVector3Df::operator!=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: first defined here
oglwindow.o: In function `MyVector3Df':
/usr/lib/qt3/include/qglist.h:150: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/usr/lib/qt3/include/qglist.h:150: first defined here
oglwindow.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: first defined here
oglwindow.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
oglwindow.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
oglwindow.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
oglwindow.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
oglwindow.o: In function `MyVector3Df::operator=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: multiple definition of `MyVector3Df::operator=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: first defined here
oglwindow.o: In function `MyVector3Df::operator+=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: multiple definition of `MyVector3Df::operator+=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: first defined here
oglwindow.o: In function `MyVector3Df::operator-=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: multiple definition of `MyVector3Df::operator-=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: first defined here
oglwindow.o: In function `MyVector3Df::operator*=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: multiple definition of `MyVector3Df::operator*=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: first defined here
oglwindow.o: In function `MyVector3Df::operator/=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: multiple definition of `MyVector3Df::operator/=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: first defined here
oglwindow.o: In function `MyVector3Df::operator==(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: multiple definition of `MyVector3Df::operator==(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: first defined here
oglwindow.o: In function `MyVector3Df::operator!=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: multiple definition of `MyVector3Df::operator!=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: first defined here
oglwindow_gui.o: In function `MyVector3Df':
/usr/lib/qt3/include/qglist.h:150: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/usr/lib/qt3/include/qglist.h:150: first defined here
oglwindow_gui.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: first defined here
oglwindow_gui.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
oglwindow_gui.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
oglwindow_gui.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
oglwindow_gui.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: multiple definition of `MyVector3Df::operator=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator+=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: multiple definition of `MyVector3Df::operator+=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator-=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: multiple definition of `MyVector3Df::operator-=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator*=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: multiple definition of `MyVector3Df::operator*=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator/=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: multiple definition of `MyVector3Df::operator/=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator==(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: multiple definition of `MyVector3Df::operator==(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: first defined here
oglwindow_gui.o: In function `MyVector3Df::operator!=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: multiple definition of `MyVector3Df::operator!=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: first defined here
moc_OGLWidget.o: In function `MyVector3Df':
/usr/lib/qt3/include/qglist.h:150: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/usr/lib/qt3/include/qglist.h:150: first defined here
moc_OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: multiple definition of `MyVector3Df::MyVector3Df()'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:57: first defined here
moc_OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
moc_OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: multiple definition of `MyVector3Df::MyVector3Df(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:61: first defined here
moc_OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
moc_OGLWidget.o: In function `MyVector3Df':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: multiple definition of `MyVector3Df::MyVector3Df(float, float, float)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:67: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: multiple definition of `MyVector3Df::operator=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:150: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator+=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: multiple definition of `MyVector3Df::operator+=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:159: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator-=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: multiple definition of `MyVector3Df::operator-=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:168: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator*=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: multiple definition of `MyVector3Df::operator*=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:177: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator/=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: multiple definition of `MyVector3Df::operator/=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:186: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator==(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: multiple definition of `MyVector3Df::operator==(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:195: first defined here
moc_OGLWidget.o: In function `MyVector3Df::operator!=(MyVector3Df const&)':
/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: multiple definition of `MyVector3Df::operator!=(MyVector3Df const&)'
main.o:/home/bulczak/Desktop/Softwarepraktikum/myvector3df.hh:200: first defined here
collect2: ld returned 1 exit status
make: *** [Softwarepraktikum] Fehler 1
KravenZ
Beiträge: 26
Registriert: 14. November 2006 16:33

Beitrag von KravenZ »

Ich glaube ich habs. Hab einfach die inline specifikationen vor den Methoden weggemacht. ^^ kA wie ich auf so ne dumme Idee kam die dahin zu machen.
Antworten