I have been wrestling with cmake for hours upon end now but I am getting it to build make files now but I am struggling to get the make command to work properly. I believe it is and issue with my libusb links but I am pretty clueless. I am using the cmake GUI on windows. I will provide screenshots of what my configurations are
I believe that these are all how they should be apart from the LIBUSB_1_LIBRARY I think as its not an actual .dll file (its a .dll.a) but I cannot find a libusb-1.0.dll anywhere. In my libusb-MinGW/lib folder I have libusb-1.0.a, libusb-1.0.dll.a and libusb-1.0.la also i have a pkgconfig file containing libusb-1.0.pc so I am not sure if the correct one is there or not. There is also a dll in libusb-MinGW/bin folder called msys-usb-1.0.dll that being the only .dll file i could find so maybe it is that one I am not sure. I apologise in advance if this is a very trivial question but I am very new to anything C related I only have experience with python and java really so this is very much uncharted territory for me and there doesn't seem to be much documentation on how to install libfreekinect apart from the github page but I have looked at that for ages and I am getting nothing from it.
- EDIT - I completely forgot to include the output from when i run the make command. I get a big wall of text that give the same thing with varying output i will provide a few lines
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\freenect.dir/objects.a(tilt.c.obj):tilt.c:(.text+0x4b): undefined reference to `libusb_bulk_transfer'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\freenect.dir/objects.a(tilt.c.obj):tilt.c:(.text+0xbf): undefined reference to `libusb_error_name'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles\freenect.dir/objects.a(tilt.c.obj):tilt.c:(.text+0x1cc): undefined reference to `libusb_bulk_transfer'
I am having the same issue (Using MSYS64)
I have built from source libusb(1.0) like this
I can see the files in /usr/local/lib
And there is a .pc file in */usr/local/lib/pkgconfig/libusb-1.0.pc
So - I go and create a Project that needlessly links to this library
Inside this I place a "Hello.world" C file.. and nothing else.
Then I create a CMakeLists.txt
So build it ...
I see the Info message libusb-1.0 was found.
Now to compile
And I get an error with
I manually check the /usr/local/lib/pkgconfig/linusb-1.0.pc
This looks ok. -L{$libdir} is however missing from the Link ...
Enter ccmake
I double checked this, using ccmake ..
Switched to advanced mode (press t), and scrolled to the bottom where I found pkg_config_lib_USB_libusb-1.0 and it was pointing to a different directory (/mingw64/lib/linusb-1.0.a)
The CMake is now altered to be
Build (again)
so
It now build correctly.
I hope this may assist you in trying to find the issue.