Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable To compile on POP OS( Ubuntu Based) #4

Closed
abhaysv opened this issue Jun 25, 2022 · 3 comments
Closed

Unable To compile on POP OS( Ubuntu Based) #4

abhaysv opened this issue Jun 25, 2022 · 3 comments

Comments

@abhaysv
Copy link

abhaysv commented Jun 25, 2022

[ 20%] Automatic MOC and UIC for target ChargeGuru
[ 20%] Built target ChargeGuru_autogen
[ 40%] Linking CXX executable ChargeGuru
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::~Device()':
Device.cc:(.text+0x14): undefined reference to `libusb_release_interface'
/usr/bin/ld: Device.cc:(.text+0x23): undefined reference to `libusb_close'
/usr/bin/ld: Device.cc:(.text+0x2f): undefined reference to `libusb_exit'
/usr/bin/ld: Device.cc:(.text+0x57): undefined reference to `libusb_attach_kernel_driver'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::m_read()':
Device.cc:(.text+0xdc): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::m_write(b6::Packet)':
Device.cc:(.text+0x1ae): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::m_sendCommand(b6::CMD)':
Device.cc:(.text+0x289): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::Device()':
Device.cc:(.text+0xcf5): undefined reference to `libusb_init'
/usr/bin/ld: Device.cc:(.text+0xd0f): undefined reference to `libusb_open_device_with_vid_pid'
/usr/bin/ld: Device.cc:(.text+0xd26): undefined reference to `libusb_kernel_driver_active'
/usr/bin/ld: Device.cc:(.text+0xd36): undefined reference to `libusb_claim_interface'
/usr/bin/ld: Device.cc:(.text+0xd77): undefined reference to `libusb_detach_kernel_driver'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::setBuzzers(bool, bool)':
Device.cc:(.text+0xe86): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::setCycleTime(int)':
Device.cc:(.text+0x103a): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::setTempLimit(int)':
Device.cc:(.text+0x11ca): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::setCapacityLimit(bool, int)':
Device.cc:(.text+0x139f): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o): in function `b6::Device::setTimeLimit(bool, int)':
Device.cc:(.text+0x15af): undefined reference to `libusb_interrupt_transfer'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../../lib/libb6.a(Device.cc.o):Device.cc:(.text+0x1a2c): more undefined references to `libusb_interrupt_transfer' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ChargeGuru.dir/build.make:134: ChargeGuru] Error 1
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/ChargeGuru.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
@abhaysv
Copy link
Author

abhaysv commented Jun 25, 2022

Cmake gives the following output it seems the libusb is detected still this issue.

CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:44 (message):
  qt5_use_modules is not part of the official API, and might be removed in Qt
  6.
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:431 (_qt5_warn_deprecated)
  CMakeLists.txt:25 (qt5_use_modules)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found libusb-1.0:
--  - Includes: /usr/include/libusb-1.0
--  - Libraries: /usr/lib/x86_64-linux-gnu/libusb-1.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/abhaysv/Desktop/GitHub/Cell-Characterization-IMAXB6-development/build

k

@abhaysv
Copy link
Author

abhaysv commented Jun 25, 2022

I used the CMAKE File Mentioned here this seems to work for me.

#2

@abhaysv abhaysv closed this as completed Jun 25, 2022
@maciek134
Copy link
Owner

Hey, thanks for the report, this project has been kind of left alone for a while - it's been one of my first Qt projects and it shows.

A complete refactor/rewrite is in the works, should be ready in near future - will make the whole thing more maintainable and easier to work on (not sure what I was thinking with just a big cpp file with everything in it :D)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants