Danke erstmal....
Bin jetzt weiter gekommen.
Habe folgendes Tutorial verwendet um Qt 4 in Visual Studio .Net zu integrieren.
http://qtforum.de/forum/viewtopic.php?t ... tudio+2003
Habe vorher Qt 3.2.2 verwendet aber da bin ich mit einer bestimmten Funktion auf Problem gestoßen. Daraufhin hat mir jemand in nem anderen Thread empfohlen auf Qt 4 upzugraden, da hier besagte Funktion einwandfrei funktioniere.
Jetzt habe ich auch nach o.g. Tutorial die Methode zum Erstellen und Ausführen von Qt-Projekten ausprobiert. Funktioniert bei dem simplen Beispiel in dem Dokument ohne Probleme.
Nun frage ich mich warum denn dort kein .pro-File von Nöten ist und wie ihr denn bei der Erstellung von Qt-Anwendungen mit Visual Studio .net vorgeht.
Was mich hierbei stört ist die Tatsache, dass ich Opengl verwende und da muss ich doch ins pro.File folgende Zeilen hinzufügen damit Qt überhaupt mit OpenGl funktioiert:
Code: Alles auswählen
CONFIG += qt opengl warn_on release thread
CONFIG -= dlopen_opengl
REQUIRES = opengl
Auch die von Christian81 empfohlene Zeile
müsste ich doch ins .pro-File eintragen ?
Ich bekomme jetzt nämlich folgende Fehler beim Linken:
Code: Alles auswählen
Verknüpfen...
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: virtual class QPaintEngine * __thiscall QGLWidget::paintEngine(void)const " (?paintEngine@QGLWidget@@UBEPAVQPaintEngine@@XZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::glDraw(void)" (?glDraw@QGLWidget@@MAEXXZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::glInit(void)" (?glInit@QGLWidget@@MAEXXZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::paintOverlayGL(void)" (?paintOverlayGL@QGLWidget@@MAEXXZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::resizeOverlayGL(int,int)" (?resizeOverlayGL@QGLWidget@@MAEXHH@Z)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::initializeOverlayGL(void)" (?initializeOverlayGL@QGLWidget@@MAEXXZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: virtual void __thiscall QGLWidget::updateOverlayGL(void)" (?updateOverlayGL@QGLWidget@@UAEXXZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: virtual void __thiscall QGLWidget::updateGL(void)" (?updateGL@QGLWidget@@UAEXXZ)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent@QGLWidget@@MAEXPAVQResizeEvent@@@Z)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual void __thiscall QGLWidget::paintEvent(class QPaintEvent *)" (?paintEvent@QGLWidget@@MAEXPAVQPaintEvent@@@Z)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "protected: virtual bool __thiscall QGLWidget::event(class QEvent *)" (?event@QGLWidget@@MAE_NPAVQEvent@@@Z)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: virtual int __thiscall OglCode::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@OglCode@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: virtual void * __thiscall OglCode::qt_metacast(char const *)" (?qt_metacast@OglCode@@UAEPAXPBD@Z)
OglCode.obj : error LNK2001: Nichtaufgelöstes externes Symbol "public: virtual struct QMetaObject const * __thiscall OglCode::metaObject(void)const " (?metaObject@OglCode@@UBEPBUQMetaObject@@XZ)
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"__declspec(dllimport) public: virtual __thiscall QGLWidget::~QGLWidget(void)" (__imp_??1QGLWidget@@UAE@XZ)', verwiesen in Funktion '"public: virtual __thiscall OglCode::~OglCode(void)" (??1OglCode@@UAE@XZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '_gluPerspective@32', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::resizeGL(int,int)" (?resizeGL@OglCode@@MAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glLoadIdentity@0', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::resizeGL(int,int)" (?resizeGL@OglCode@@MAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glMatrixMode@4', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::resizeGL(int,int)" (?resizeGL@OglCode@@MAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glViewport@16', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::resizeGL(int,int)" (?resizeGL@OglCode@@MAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glEnd@0', verwiesen in Funktion '"protected: void __thiscall OglCode::drawApex(class Individuum)" (?drawApex@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glVertex3f@12', verwiesen in Funktion '"protected: void __thiscall OglCode::drawApex(class Individuum)" (?drawApex@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glColor3f@12', verwiesen in Funktion '"protected: void __thiscall OglCode::drawApex(class Individuum)" (?drawApex@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glBegin@4', verwiesen in Funktion '"protected: void __thiscall OglCode::drawApex(class Individuum)" (?drawApex@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glLineWidth@4', verwiesen in Funktion '"protected: void __thiscall OglCode::drawApex(class Individuum)" (?drawApex@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glVertex3d@24', verwiesen in Funktion '"protected: void __thiscall OglCode::drawCoordinateGizmo(void)" (?drawCoordinateGizmo@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glPopMatrix@0', verwiesen in Funktion '"protected: void __thiscall OglCode::drawIndSphere(class Individuum)" (?drawIndSphere@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '_gluSphere@20', verwiesen in Funktion '"protected: void __thiscall OglCode::drawIndSphere(class Individuum)" (?drawIndSphere@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glTranslatef@12', verwiesen in Funktion '"protected: void __thiscall OglCode::drawIndSphere(class Individuum)" (?drawIndSphere@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glPushMatrix@0', verwiesen in Funktion '"protected: void __thiscall OglCode::drawIndSphere(class Individuum)" (?drawIndSphere@OglCode@@IAEXVIndividuum@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glDisable@4', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::mousePressEvent(class QMouseEvent *)" (?mousePressEvent@OglCode@@MAEXPAVQMouseEvent@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glEnable@4', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::mousePressEvent(class QMouseEvent *)" (?mousePressEvent@OglCode@@MAEXPAVQMouseEvent@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"public: static float __cdecl Vec::spatPunkt(class Vec,class Vec,class Vec)" (?spatPunkt@Vec@@SAMV1@00@Z)', verwiesen in Funktion '"protected: void __thiscall OglCode::computeVolume(void)" (?computeVolume@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"public: __thiscall Vec::Vec(void)" (??0Vec@@QAE@XZ)', verwiesen in Funktion '"protected: void __thiscall OglCode::computeVolume(void)" (?computeVolume@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"__declspec(dllimport) public: __thiscall QGLWidget::QGLWidget(class QWidget *,class QGLWidget const *,class QFlags<enum Qt::WindowType>)" (__imp_??0QGLWidget@@QAE@PAVQWidget@@PBV0@V?$QFlags@W4WindowType@Qt@@@@@Z)', verwiesen in Funktion '"public: __thiscall OglCode::OglCode(class QWidget *)" (??0OglCode@@QAE@PAVQWidget@@@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"__declspec(dllimport) public: void __thiscall QGLWidget::swapBuffers(void)" (__imp_?swapBuffers@QGLWidget@@QAEXXZ)', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"__declspec(dllimport) public: void __thiscall QGLWidget::renderText(double,double,double,class QString const &,class QFont const &,int)" (__imp_?renderText@QGLWidget@@QAEXNNNABVQString@@ABVQFont@@H@Z)', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '_gluQuadricDrawStyle@8', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glColor4f@16', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glCallList@4', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glLoadName@4', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glRotatef@16', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '_gluLookAt@72', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glLightfv@12', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glShadeModel@4', verwiesen in Funktion '"protected: void __thiscall OglCode::draw(void)" (?draw@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glEndList@0', verwiesen in Funktion '"protected: void __thiscall OglCode::makePop(void)" (?makePop@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glNewList@8', verwiesen in Funktion '"protected: void __thiscall OglCode::makePop(void)" (?makePop@OglCode@@IAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glFlush@0', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '_gluPickMatrix@36', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glPushName@4', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glInitNames@0', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glRenderMode@4', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glSelectBuffer@8', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glGetIntegerv@8', verwiesen in Funktion '"protected: void __thiscall OglCode::processHits(int,int)" (?processHits@OglCode@@IAEXHH@Z)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glClearColor@16', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::initializeGL(void)" (?initializeGL@OglCode@@MAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '__imp__glClear@4', verwiesen in Funktion '"protected: virtual void __thiscall OglCode::paintGL(void)" (?paintGL@OglCode@@MAEXXZ)'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '_gluNewQuadric@0', verwiesen in Funktion '_$E1'
OglCode.obj : error LNK2019: Nicht aufgelöstes externes Symbol '"public: __thiscall Individuum::Individuum(void)" (??0Individuum@@QAE@XZ)', verwiesen in Funktion '_$E3'
Release/Test.exe : fatal error LNK1120: 57 unaufgelöste externe Verweise