Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall MyForm::MyForm(class QWidge..........

mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall MyForm::MyForm(class QWidge..........

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k 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.
  • K Offline
    K Offline
    khalooei
    wrote on last edited by SGaist
    #1
    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: __thiscall MyForm::MyForm(class QWidget *)" (??0MyForm@@QAE@PAVQWidget@@@Z) referenced in function "private: void __thiscall MainWindow::on_pushButton_clicked(void)" (?on_pushButton_clicked@MainWindow@@AAEXXZ)
    

    ============================================================

    #include "mainwindow.h"
    #include "ui_mainwindow.h"
    #include "myform.h"
    
    MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
    }
    
    MainWindow::~MainWindow()
    {
        delete ui;
    }
    
    void MainWindow::on_pushButton_clicked()
    {
        MyForm *dialoge = new MyForm();
        dialoge->show();
    }
    

    [edit: Added missing codings tags SGaist]

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by mcosta
      #2

      How is defined the Myform constructor?

      Is MyForm defined in your .pro file?

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      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