[Solved]Unresolved external symbol Link error while compiling Qt program on wondows 7
-
Hi All,
I have installed Qt 5.0.1 and Qwt 6.1 on my windows 7 based PC. I am compiling my program through Qt Creater 2.6.2. While compiling I am getting link errors related to socket functions like shutdown,recv and socket etc. I added WS2_32 library to .pro file (win32:LIBS += -lws2_32) still I am getting same error.Following are the error that i am getting while compiling.
mainwindow.obj:-1: error: LNK2019: unresolved external symbol __imp__shutdown@8 referenced in function "public: virtual __thiscall MainWindow::~MainWindow(void)" (??1MainWindow@@UAE@XZ)
plot.obj:-1: error: LNK2019: unresolved external symbol __imp__recv@16 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
plot.obj:-1: error: LNK2019: unresolved external symbol __imp__bind@12 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
plot.obj:-1: error: LNK2019: unresolved external symbol __imp__htons@4 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
plot.obj:-1: error: LNK2019: unresolved external symbol __imp__htonl@4 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
plot.obj:-1: error: LNK2019: unresolved external symbol __imp__socket@12 referenced in function "public: __thiscall Plot::Plot(class QWidget *)" (??0Plot@@QAE@PAVQWidget@@@Z)
moc_plot.obj:-1: error: LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtPlot::staticMetaObject" (?staticMetaObject@QwtPlot@@2UQMetaObject@@B)
debug\navigation.exe:-1: error: LNK1120: 7 unresolved externals
Can anyone please help me.Regards
Mahendra -
Hi,
can you post the code of PLot class and you .pro file?
Compiling error is related to missing library linked (probably wsock32)
Regards
-
Hi
Actually this problem is solved...I was trying to install older version of qwt. but when i installed qwt 6.1 it was correctly installed...Thanks for your reply..Regards
Mahendra
[quote author="mcosta" date="1363972815"]Hi,can you post the code of PLot class and you .pro file?
Compiling error is related to missing library linked (probably wsock32)
Regards
[/quote]