Mr-Ntic / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

collect2: ld returned 1 exit status #101

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
After some time i managed to compile qextserialport and get a dll.
Now i want to use this dll in another project and i cant do it.

Actually i added the library headers to the project and these lines to my .pro 
file.

HEADERS += \
    qextserialport_global.h \
    qextserialport.h \
    qextserialenumerator.h

LIBS += -lqextserialport -lsetupapi
LIBS += -Lc:/Users/pico/Desktop/qtextserial/

but when i try to compile i get this error 

release/moc_qextserialenumerator.o:moc_qextserialenumerator.cpp:(.rdata$_ZTV28Qe
xtSerialRegistrationWidget[vtable for QextSerialRegistrationWidget]+0xb8): 
undefined reference to `QextSerialRegistrationWidget::winEvent(tagMSG*, long*)'
collect2: ld returned 1 exit status

Is this a bug or i am doing something wrong here?

Original issue reported on code.google.com by pasxal.a...@gmail.com on 8 Jul 2011 at 4:30

GoogleCodeExporter commented 8 years ago
Yes, you are wrong. You cannot add the qextserialport's header files to you 
project's .pro when you using qextserialport as an library.

as moc will try to deal all file listed in  the HEADERS.

For more information, you can see this version:
http://code.google.com/r/dbzhang800-qextserialport/

Original comment by dbzhang...@gmail.com on 10 Nov 2011 at 2:28

GoogleCodeExporter commented 8 years ago

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 8:27