Undefined symbols for architecture x86_64
-
Having a problem linking with hid api library, any help?
@
/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.8.sdk -mmacosx-version-min=10.6 -o Test.app/Contents/MacOS/Test main.o mainwindow.o moc_mainwindow.o -F/Users/ericspata/Qt/5.3/clang_64/lib -framework CoreFoundation -framework IOKit -framework QtWidgets -framework QtGui -framework QtCore -framework OpenGL -framework AGL
Undefined symbols for architecture x86_64:
"_hid_enumerate", referenced from:
MainWindow::on_pushButton_clicked() in mainwindow.o
"_hid_free_enumeration", referenced from:
MainWindow::on_pushButton_clicked() in mainwindow.o
"_hid_open_path", referenced from:
MainWindow::on_pushButton_clicked() in mainwindow.o
"_hid_read_timeout", referenced from:
MainWindow::on_pushButton_clicked() in mainwindow.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Test.app/Contents/MacOS/Test] Error 1
22:04:13: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Test (kit: Desktop Qt 5.3 clang 64bit)
When executing step "Make"
@This is what my .pro file looks:
@
#-------------------------------------------------Project created by QtCreator 2014-09-02T14:38:42
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Test
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
hidapi.hFORMS += mainwindow.ui
@ -
Hi, please use code tags (@) when posting code on this forum.
Most probably, your library was compiled in 32 bit, but you are trying to link it to your 64 bit application. Best would be to recompile the HID library in 64 bit.