Linux Compilation


Congrats on releasing 64-Bit versions! I’ve got it woking with OpenSUSE10. BUT…

I am using KDevelop to create an incredibly simple C++ program. Its a console mode program that creates an object of type “okCUsbFrontPanel”, using the static libraries compiled for linux. My project configuration finds the header and library file successfully, but I get many undefined references, when it attempts to link “libokFrontPanel.a”.

Here is a dump of some of the errors:

/usr/local/lib/libokFrontPanel.a(okCUsbDevice_Linux.o): In function okCUsbDevice::~okCUsbDevice()': okCUsbDevice_Linux.cpp:(.text+0x191): undefined reference tousb_release_interface’
okCUsbDevice_Linux.cpp:(.text+0x19e): undefined reference to usb_close' /usr/local/lib/libokFrontPanel.a(okCUsbDevice_Linux.o): In functionokCUsbDevice::~okCUsbDevice()’:
okCUsbDevice_Linux.cpp:(.text+0x1cb): undefined reference to usb_release_interface' okCUsbDevice_Linux.cpp:(.text+0x1d8): undefined reference tousb_close’
/usr/local/lib/libokFrontPanel.a(okCUsbDevice_Linux.o): In function `okCUsbDevice::getSerialNumber(usb_device*, usb_dev_handle*)’:

And this is my source file:


#include “/usr/local/include/okCUsbFrontPanel.h”

using namespace std;

int main(int argc, char *argv])
cout << “Hello, world!” << endl;
okCUsbFrontPanel usb;

I have remembered to link the libraries as well, but I can’t show that here.

Any help with this is appreciated. It seems that the FrontPanel library is linking to something I’ve not got.


Have you linked with libusb? (-lusb)