Can't run on other computer



  • well i write a program with QtSDK 1.1.9 on windows 7 for desktop, using standard qt libs(like qapplication...) and qopengl lib. now i want deploy it finding no file in folder "release", while i get files in folder "debug" and copied some dll into it. finally it can run normally (without compiler) on my computer. but i copied the folder to my friend's computer(windows 7 also) ,it can run the qtgui parts normally, but when it comes to the part using opengl it doesn't show the right things.
    how can i solve this problem? i want it to be able to run at any desktop( firstly windows 7 & xp).



  • You must build your project in release mode, then you can get files from release folder.
    About OpenGL, what exactly show wrong?



  • [quote author="qxoz" date="1322496723"]You must build your project in release mode, then you can get files from release folder.
    About OpenGL, what exactly show wrong? [/quote]

    i tried the release mode. the release file can't even run normally on my computer (it have the same problem as it on my friends computer).

    this is my code. well if you don't want to read it ,i explanin it here. i first draw three line for axix x y and z, and than draw some dots there. but i can only see the lines but no dots. i update the gl after i draw all the dots.

    @#include "visualazition.h"
    #include <QtOpenGL/QGLWidget>
    #include <iostream>
    using namespace std;

    extern int N,m;
    int j=1;
    float ro=0;

    float getdata(int ste, int num, int xyz);

    visualazition::visualazition(QWidget *parent,
    const QGLWidget *shareWidge,Qt::WindowFlags f){
    setMinimumSize(320,240);
    resize(640,480);
    setWindowTitle(tr("GROUP"));
    startTimer(5);
    }

    void visualazition::initializeGL()
    {
    glShadeModel(GL_SMOOTH);
    glClearColor(1.0,1.0,1.0,0.0);
    glClearDepth(1.0);
    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
    glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
    }

    void visualazition::paintGL(){
    float sro=20.0/m;

    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
    glLoadIdentity();
    glTranslatef(-1.5,-1.5,-8);
    glRotatef(-90,1.0,0.0,0.0);
    glRotatef(30+ro,0.0,0.0,1.0);
    
    glColor3f(1.0,0.0,0.0);
            glBegin(GL_LINE_STRIP);
                    glVertex3f(-2.0,0.0,0.0);
                    glVertex3f(4.0,0.0,0.0);
            glEnd();
    glColor3f(0.0,1.0,0.0);
            glBegin(GL_LINE_STRIP);
                    glVertex3f(0.0,-4.0,0.0);
                    glVertex3f(0.0,4.0,0.0);
            glEnd();
    glColor3f(0.0,0.0,1.0);
            glBegin(GL_LINE_STRIP);
                    glVertex3f(0.0,0.0,0.0);
                    glVertex3f(0.0,0.0,4.0);
            glEnd();
    
            glColor3f(0.0,0.0,0.0);
            glPointSize(5);
            glBegin(GL_POINTS);
                    for (int i=1;i<=N;i++){
                            glVertex3f(getdata(j,i,1)/5.0,getdata(j,i,2)/5.0,getdata(j,i,3)/5.0);
                    }
            glEnd();
            j++;ro+=sro;
    

    }

    void visualazition::resizeGL(int width, int height){
    glViewport(0,0,width,height);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(45.0,width/height,0.1,100.0);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    }

    void visualazition::timerEvent( QTimerEvent * ){
    if (j<=m)
    updateGL();
    }@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.