Matthew
Matthew

Reputation: 3946

Qt 4.8 Link error with Visual Studio 2010

I am receiving a link error when trying to compile my "hello world" Qt program.

Error 1 error LNK2001: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall QObject::disconnectNotify(char const *)" (__imp_?disconnectNotify@QObject@@MAEXPBD@Z) C:\Users\Matthew\documents\visual studio 2010\Projects\FBIDecryptor\FBIDecryptor\main.obj FBIDecryptor

I believe I am missing a library input, but I don't know which library.

This is the code I am trying to execute:

int main(int argc, char* argv[])
{
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt");
    label->show();

    return app.exec();
}

Upvotes: 0

Views: 124

Answers (1)

Barath Ravikumar
Barath Ravikumar

Reputation: 5836

You are missing reference to QtCore, QtWidget and other Core library modules. Adding the Qt4.8/bin path to the environment variable should fix this.

Found a useful set up guide here

Upvotes: 1

Related Questions