DobotTeam / Dobot_for_Developers

Dobot For Developers | OpenSource of DobotTools | Dobot Protocol
18 stars 5 forks source link

Undefined symbols, QDeviceWatcherPrivate::parseDeviceInfo etc #1

Closed erwincoumans closed 8 years ago

erwincoumans commented 8 years ago

On Mac OSX, run qmake, then make:

[~/Downloads/Dobot-master/DobotTools/DobotServer]$ make /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.7 -Wl,-rpath,/usr/local/Cellar/qt5/5.4.0/lib -o DobotServer.app/Contents/MacOS/DobotServer main.o MainWindow.o COptions.o DobotServer.o COptionsDialog.o qdevicewatcher.o qdevicewatcher_win32.o qrc_res.o moc_MainWindow.o moc_COptions.o moc_DobotServer.o moc_COptionsDialog.o moc_qdevicewatcher.o moc_qdevicewatcher_p.o -F/usr/local/Cellar/qt5/5.4.0/lib -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSerialPort -framework QtNetwork -framework OpenGL -framework AGL Undefined symbols for architecture x86_64: "QDeviceWatcherPrivate::parseDeviceInfo()", referenced from: QDeviceWatcherPrivate::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) in moc_qdevicewatcher_p.o QDeviceWatcherPrivate::qt_metacall(QMetaObject::Call, int, void**) in moc_qdevicewatcher_p.o "QDeviceWatcherPrivate::run()", referenced from: vtable for QDeviceWatcherPrivate in moc_qdevicewatcher_p.o "QDeviceWatcherPrivate::stop()", referenced from: QDeviceWatcher::start() in qdevicewatcher.o QDeviceWatcher::stop() in qdevicewatcher.o "QDeviceWatcherPrivate::start()", referenced from: QDeviceWatcher::start() in qdevicewatcher.o "QDeviceWatcherPrivate::~QDeviceWatcherPrivate()", referenced from: vtable for QDeviceWatcherPrivate in moc_qdevicewatcher_p.o "QDeviceWatcherPrivate::~QDeviceWatcherPrivate()", referenced from: vtable for QDeviceWatcherPrivate in moc_qdevicewatcher_p.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

erwincoumans commented 8 years ago

It can be fixed by replacing

src/QDeviceWatcher\qdevicewatcher_mac.cpp to src/QDeviceWatcher\qdevicewatcher_mac.cpp in DobotServer.pro Then add -framework CoreFoundation in the Makefile (next to -framework OpenGL)