a1ien / libusb1-sys

MIT License
13 stars 10 forks source link

Fail to link on Win32 platform #5

Closed otavio closed 4 years ago

otavio commented 4 years ago

We are using the (as well as rusb) on an internal library and it works pretty well. However, one of our requirements is to provide Windows 32 and 64-bit support.

We are getting errors when linking to the 32-bit flavor. We've been struggling with this for a few days, so I'd like to know if you could take a look at this and see if you could help?

Some examples of the linking error:

test.test.dvy3h0uq-cgu.15.rcgu.o : error LNK2019: unresolved external symbol _libusb_open_device_with_vid_pid referenced in function __ZN4rusb7context10UsbContext24open_device_with_vid_pid17h4d5b1707d7a5a313E [D:\a\libtest\build\test_target.vcxproj]
test.test.dvy3h0uq-cgu.7.rcgu.o : error LNK2001: unresolved external symbol _libusb_open_device_with_vid_pid [D:\a\libtest\build\test_target.vcxproj]
              Hint on symbols that are defined and could potentially match:
                _libusb_open_device_with_vid_pid@12
test.test.dvy3h0uq-cgu.3.rcgu.o : error LNK2019: unresolved external symbol _libusb_release_interface referenced in function __ZN4core3ptr18real_drop_in_place17h32d5cf5582c84dcbE [D:\a\libtest\build\test_target.vcxproj]
test.test.dvy3h0uq-cgu.7.rcgu.o : error LNK2001: unresolved external symbol _libusb_release_interface [D:\a\libtest\build\test_target.vcxproj]
              Hint on symbols that are defined and could potentially match:
                _libusb_release_interface@8
a1ien commented 4 years ago

I have no idea what is wrong here. But I will try to figure out the field of the new year, if you don't find earlier a solution earlier.