milgner / k290-fnkeyctl

Configures the behaviour of the F-keys on the Logitech K290
MIT License
222 stars 29 forks source link

undefined references #2

Closed jegesm closed 10 years ago

jegesm commented 10 years ago

Hi Marcus,

I tried it on ubuntu 12.04 with clang and libusb installed, but received lots of undefined references. First I thought something is wrong with linking the libusb but it looks allright. What else am I missing? Thanks in advance! David

sh build.sh /tmp/k290_fnkeyctl-H1ayn6.o: In function __cxx_global_var_init': k290_fnkeyctl.cpp:(.text+0x11): undefined reference tostd::ios_base::Init::Init()' k290_fnkeyctl.cpp:(.text+0x19): undefined reference to std::ios_base::Init::~Init()' /tmp/k290_fnkeyctl-H1ayn6.o: In functiongetK290Device(std::shared_ptr&)': k290_fnkeyctl.cpp:(.text+0x7c): undefined reference to libusb_get_device_list' k290_fnkeyctl.cpp:(.text+0xbb): undefined reference tolibusb_free_device_list' k290_fnkeyctl.cpp:(.text+0xc3): undefined reference to std::placeholders::_1' k290_fnkeyctl.cpp:(.text+0x149): undefined reference tolibusb_get_device_descriptor' ..........

milgner commented 10 years ago

Hi David,

that looks like it has problems linking against both libstdc++ and libusb. What's your version of them as well as of clang?

milgner commented 10 years ago

Update: also you could try the fork at chrstn-hntschl/k290-fnkeyctl@a40bf6b63 which has been modified to work in Ubuntu.

jegesm commented 10 years ago

Thanks for the quick reply!

libstdc++.so.6.0.16 libusb-0.1.so.4.4.4 and clang: Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0) Target: x86_64-pc-linux-gnu Thread model: posix

jegesm commented 10 years ago

Hello again, the problem for me was the -std=c++11 flag. When I used -std=c++0x instead it compiled. Thanks a lot! it is working properly. David

milgner commented 10 years ago

Great to know, thanks for the feedback! Maybe I should write a proper Makefile after all... :smirk: