grag38 / qextserialport

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

Enumerator doesn't build under OSX #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I am not able to compile the enumerator example with a static Library.

I get s.th. like this:

"_IORegistryEntryGetPath", referenced from:
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IONotificationPortGetRunLoopSource", referenced from:
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IOServiceGetMatchingServices", referenced from:
QextSerialEnumerator::getPorts() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getPorts() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IOObjectRelease", referenced from:
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getPorts() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getPorts() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IONotificationPortDestroy", referenced from:
QextSerialEnumerator::~QextSerialEnumerator()in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::~QextSerialEnumerator()in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IOServiceAddMatchingNotification", referenced from:
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IORegistryEntryGetParentEntry", referenced from:
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IORegistryEntrySearchCFProperty", referenced from:
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IOIteratorNext", referenced from:
deviceDiscoveredCallbackOSX(void*, unsigned int)in
libqextserialportd.a(qextserialenumerator_osx.o)
deviceTerminatedCallbackOSX(void*, unsigned int)in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::iterateServicesOSX(unsigned int,
QList<QextPortInfo>&)in libqextserialportd.a(qextserialenumerator_osx.o)
"_IOMasterPort", referenced from:
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IOServiceNameMatching", referenced from:
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getPorts() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IORegistryEntryCreateCFProperty", referenced from:
QextSerialEnumerator::getServiceDetailsOSX(unsigned int, QextPortInfo*)in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IONotificationPortCreate", referenced from:
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_IOServiceMatching", referenced from:
QextSerialEnumerator::setUpNotifications() in
libqextserialportd.a(qextserialenumerator_osx.o)
QextSerialEnumerator::getPorts() in
libqextserialportd.a(qextserialenumerator_osx.o)
"_kIOMasterPortDefault", referenced from:
_kIOMasterPortDefault$non_lazy_ptr in
libqextserialportd.a(qextserialenumerator_osx.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [enumerator.app/Contents/MacOS/enumerator] Error 1

Original issue reported on code.google.com by tuxia...@gmail.com on 4 Apr 2010 at 10:03

GoogleCodeExporter commented 8 years ago
Make sure you're linking against IOKit

Original comment by lst...@gmail.com on 4 Apr 2010 at 5:35

GoogleCodeExporter commented 8 years ago
How can I set this in Qt Creator?

Original comment by tuxia...@gmail.com on 4 Apr 2010 at 5:58

GoogleCodeExporter commented 8 years ago
Do it in your .pro file.  Check src.pro for an example

Original comment by lst...@gmail.com on 4 Apr 2010 at 6:35

GoogleCodeExporter commented 8 years ago
Ok thx it works. Why do you don't put this in the enumerator.src?

Original comment by tuxia...@gmail.com on 4 Apr 2010 at 6:38

GoogleCodeExporter commented 8 years ago
If enumerator depends on that, I think it indicates a build problem.  Either 
the static lib is not getting built 
correctly, or there's some other weirdness in your setup.  

Original comment by lst...@gmail.com on 4 Apr 2010 at 7:36

GoogleCodeExporter commented 8 years ago
I have build the lib with CONFIG += staticlib. And I tried various Qt 
setups(sdk from
dmg, self compiled static qt etc.)

Original comment by tuxia...@gmail.com on 4 Apr 2010 at 10:04

GoogleCodeExporter commented 8 years ago

Original comment by dbzhang...@gmail.com on 16 Mar 2012 at 6:19