Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Spanish
  4. Error Qt
Forum Updated to NodeBB v4.3 + New Features

Error Qt

Scheduled Pinned Locked Moved Spanish
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous0
    wrote on last edited by
    #1

    Hola, estoy aprendiendo a usar QT y me da un error:
    bq. :-1: error: LNK1104: no se puede abrir el archivo 'glu32.lib'
    Código del archivo .pro:
    @#-------------------------------------------------

    Project created by QtCreator 2013-09-08T19:42:45

    #-------------------------------------------------

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = miprimerproyecto
    TEMPLATE = app

    SOURCES += main.cpp
    miv.cpp
    #user.cpp

    HEADERS += miv.h
    #user.h

    FORMS += miv.ui@
    Código del archivo miv.h:
    @#ifndef MIV_H
    #define MIV_H

    #include <QMainWindow>

    namespace Ui {
    class MiV;
    }

    class MiV : public QMainWindow
    {
    Q_OBJECT

    public:
    explicit MiV(QWidget *parent = 0);
    ~MiV();

    private:
    Ui::MiV *ui;
    };

    #endif // MIV_H@
    Código del archivo main.cpp:
    @#include "miv.h"
    #include <QApplication>
    #include <QLabel>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    QLabel hw("Hola mundo");
    MiV w;
    w.show();
    
    return a.exec&#40;&#41;;
    

    }
    Código del archivo miv.cpp:
    #include "miv.h"
    #include "ui_miv.h"

    MiV::MiV(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MiV)
    {
    ui->setupUi(this);
    }

    MiV::~MiV()
    {
    delete ui;
    }@
    Código del archivo miv.ui:
    @<?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
    <class>MiV</class>
    <widget class="QMainWindow" name="MiV">
    <property name="geometry">
    <rect>
    <x>0</x>
    <y>0</y>
    <width>400</width>
    <height>300</height>
    </rect>
    </property>
    <property name="windowTitle">
    <string>MiV</string>
    </property>
    <widget class="QWidget" name="centralWidget"/>
    <widget class="QMenuBar" name="menuBar">
    <property name="geometry">
    <rect>
    <x>0</x>
    <y>0</y>
    <width>400</width>
    <height>21</height>
    </rect>
    </property>
    </widget>
    <widget class="QToolBar" name="mainToolBar">
    <attribute name="toolBarArea">
    <enum>TopToolBarArea</enum>
    </attribute>
    <attribute name="toolBarBreak">
    <bool>false</bool>
    </attribute>
    </widget>
    <widget class="QStatusBar" name="statusBar"/>
    </widget>
    <layoutdefault spacing="6" margin="11"/>
    <resources/>
    <connections/>
    </ui>@

    1 Reply Last reply
    0
    • T Offline
      T Offline
      topocc
      wrote on last edited by
      #2

      que version de qt esta usando, que compilador, que sistema operativo, solo asi te podemos ayudar.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved