Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

QtSerialPort windows static link

$
0
0
Hi, I use static build Qt4.8 on windows XP. Now I need use QtSerialPort library in my program. So I downloaded this library a compilated it. Every thing seems good (no error). So I create new Project with this library, compiling is ok, but linker take me a lot of error. But I included library Qserialport.a to linker. I added to serial_port.pro this lines: CONFIG += serialport LIBS +=-lQtSerialPort but linker take this error: C:/MinGW/bin/mingw32-make.exe -f Makefile.Debug mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/pou/Desktop/serial_port' g++ -static -static-libgcc -Wl,-subsystem,windows -o debug\serial_ports.exe debug/main.o debug/mainwindow.o debug/text_porting.o debug/moc_mainwindow.o debug/moc_text_porting.o  -L"z:\qt-static\QtSources\4.8.1\lib" -lmingw32 -lqtmaind -lQtSerialPortd -lQtSerialPort -lQtGuid -lsetupapi -lQtCore -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCored -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/pou/Desktop/serial_port' z:\qt-static\QtSources\4.8.1\lib\libQtCored.a(qcoreapplication.o): In function `ZN23QCoreApplicationPrivate13checkInstanceEPKc': Z:\qt-static\QtSources\4.8.1\src\corelib/kernel/qcoreapplication.cpp:213: multiple definition of `QCoreApplicationPrivate::checkInstance(char const*)' z:\qt-static\QtSources\4.8.1\lib\libQtCore.a(qcoreapplication.o):qcoreapplication.cpp:(.text+0x480): first defined here z:\qt-static\QtSources\4.8.1\lib\libQtCored.a(qcoreapplication.o): In function `Z32qt_register_signal_spy_callbacksRK21QSignalSpyCallbackSet': Z:\qt-static\QtSources\4.8.1\src\corelib/kernel/qcoreapplication.cpp:225: multiple definition of `qt_register_signal_spy_callbacks(QSignalSpyCallbackSet const&)' z:\qt-static\QtSources\4.8.1\lib\libQtCore.a(qcoreapplication.o):qcoreapplication.cpp:(.text+0x4b0): first defined here z:\qt-static\QtSources\4.8.1\lib\libQtCored.a(qcoreapplication.o): In function `qt_startup_hook': Thank for answer!

Viewing all articles
Browse latest Browse all 2113

Trending Articles