Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 903449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:52:49+00:00 2026-05-15T15:52:49+00:00

sys info : win xp SP3 , Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM

  • 0

sys info : win xp SP3 , Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM

Microsoft .NET Framework
Version 3.5 SP1

Qt Add-in 1.1.5

I installed Qt 4.6.3 from the site http://qt.nokia.com/downloads/windows-cpp-vs2008.
Then I added the Add-in Qt 1.1.5 and configured the PATH variable.

When I open a new QT project , default example works just fine.

On Nokia (qt) site I found some examples but it seems that things are not working properly.

Here is one of many examples that do not work :

#include <QtGui>
#include <QWidget>

 class QLabel;
 class QLineEdit; 
 class QTextEdit;


class AddressBook : public QWidget
 {
     Q_OBJECT

 public:
     AddressBook(QWidget *parent = 0);

 private:
     QLineEdit *nameLine;
     QTextEdit *addressText;
 };

AddressBook::AddressBook(QWidget *parent)
     : QWidget(parent)
 {
     QLabel *nameLabel = new QLabel(tr("Name:"));
     nameLine = new QLineEdit;

     QLabel *addressLabel = new QLabel(tr("Address:"));
     addressText = new QTextEdit;

     QGridLayout *mainLayout = new QGridLayout;
     mainLayout->addWidget(nameLabel, 0, 0);
     mainLayout->addWidget(nameLine, 0, 1);
     mainLayout->addWidget(addressLabel, 1, 0, Qt::AlignTop);
     mainLayout->addWidget(addressText, 1, 1);

     setLayout(mainLayout);
     setWindowTitle(tr("Simple Address Book"));
 }

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

     AddressBook addressBook;
     addressBook.show();

     return app.exec();
}

Compiler says this ::

Output Window

Linking…

main.obj : error LNK2001: unresolved external symbol “public: virtual struct QMetaObject const * __thiscall AddressBook::metaObject(void)const ” (?metaObject@AddressBook@@UBEPBUQMetaObject@@XZ)

main.obj : error LNK2001: unresolved external symbol “public: virtual void * __thiscall AddressBook::qt_metacast(char const *)” (?qt_metacast@AddressBook@@UAEPAXPBD@Z)

main.obj : error LNK2001: unresolved external symbol “public: virtual int __thiscall AddressBook::qt_metacall(enum QMetaObject::Call,int,void * *)” (?qt_metacall@AddressBook@@UAEHW4Call@QMetaObject@@HPAPAX@Z)

main.obj : error LNK2001: unresolved external symbol “public: static struct QMetaObject const AddressBook::staticMetaObject” (?staticMetaObject@AddressBook@@2UQMetaObject@@B)

C:\Documents and Settings\nik\My Documents\Visual Studio 2008\Projects\vs_03\Debug\vs_03.exe : fatal error LNK1120: 4 unresolved externals

Results

Build log was saved at “file://c:\Documents and Settings\nik\My Documents\Visual Studio 2008\Projects\vs_03\vs_03\Debug\BuildLog.htm”
vs_03 – 5 error(s), 0 warning(s)

It seems to me that the thing has to do with the use of macro Q_OBJECT but just dont know what to do that thing starts to work properly.

Maybe wrong installation or … NO IDEA

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:52:50+00:00Added an answer on May 15, 2026 at 3:52 pm

    I find solution.

    Read all the details about the installation on this page >>

    http://dcsoft.wordpress.com/?aspxerrorpath=/community_server/blogs/dcsoft/archive/2009/03/06/how-to-setup-qt-4-5-visual-studio-integration.aspx.

    After a whole day of studying and configuration, I finally managed to enable QT 4.6.3. on the VS 2008. Follow the detailed instructions and there should not be a problem.

    My problem was that I used the following options:

    Starting with Qt 4.6, the LPGL version now comes pre-built for Visual Studio 2008 RTM. If this fits your need, you can simply install it and skip to INSTALL VISUAL STUDIO ADD-IN.

    This was wrong in my case so I go to next chapter :

    DOWNLOAD QT SOURCE CODE

    As the option to download only the Qt source code is a bit obfuscated on the current Nokia website, please follow these directions: ……………………………………………………………………………………………………………………………………………………………………………………………………… etc. READ ON THE SITE.

    For now all works great.There are no errors in linking. MOC works fine …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 445k
  • Answers 445k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think your intuition is correct, you can read all… May 15, 2026 at 7:01 pm
  • Editorial Team
    Editorial Team added an answer Standard operation for programs that want to avoid losing everything:… May 15, 2026 at 7:01 pm
  • Editorial Team
    Editorial Team added an answer If you dial up the verbosity to detailed or above… May 15, 2026 at 7:01 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.