PDA

View Full Version : Linking QextSerialPort on Windows



msr
1st October 2011, 21:56
Hello,

I've been using QextSerialPort on Linux without problems. But today I tried to compile the code on Windows and I can't link my application to QextSerialPort.

The directories' hierarchy is:

myapp
qextserialport
src
build


I did the following:
- comment VERSION on src.pro file in order to create .dll without numbers
- open src.pro (QextSerialPort), run qmake, build all
- (do the same for debug and release versions)
- after that I get 4 files: libqextserialport.a, qextserialport.dll, libqextserialportd.a, qextserialportd.dll
- copy .dll files to C:\Windows\System32\ (which is in PATH environment variable)

After compile "myapp" I get:

:: error: cannot find -lqextserialport
:: error: collect2: ld returned 1 exit status
This means the linker wasn't able to link qextserialport to myapp right?

myapp.pro:


QT -= gui
TARGET = BASE_Commander
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
OBJECTS_DIR = tmp
MOC_DIR = tmp

# DEFINES += QT_NO_DEBUG_OUTPUT
DEPENDPATH += .
INCLUDEPATH += ./qextserialport/src
QMAKE_LIBDIR += ./qextserialport/src/build
LIBS += -lqextserialport

SOURCES += main.cpp \
commander.cpp \
base.cpp
HEADERS += commander.h \
base.h \
codes.h


I tried to rerun qmake and recompile many times but it always can't find qextserialport.

I'm using qt sdk open-source version (2010.05) on Win7 32bit.


What am I missing?