How to compile a windows application using DLL's on Linux

619 views Asked by At

I have the SDK for a USB device which works on windows. I can compile my code without problems. However, the SDK is using DLL's, and there is no support for the device on Linux.

Can I compile the code on Linux with the DLL's? I've been looking at Wine to do so, but I have no clue where to even start.

Is it even possible?

EDIT:

Output from dmesg:

[ 430.699883] usb 3-2: new high-speed USB device number 4 using xhci_hcd

[ 430.829091] usb 3-2: New USB device found, idVendor=132b, idProduct=210b

[ 430.829100] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

[ 430.829106] usb 3-2: Product: Illuminance Spectrophotometer CL-500A

[ 430.829111] usb 3-2: Manufacturer: KONICA MINOLTA, INC.

[ 430.829115] usb 3-2: SerialNumber: 10001991

[ 430.830678] hid-generic 0003:132B:210B.0002: hiddev0,hidraw1: USB HID v1.11 Device [KONICA MINOLTA, INC. Illuminance Spectrophotometer CL-500A] on usb-0000:00:14.0-2/input0

[ 430.831732] hid-generic 0003:132B:210B.0003: hiddev0,hidraw2: USB HID v1.11 Device [KONICA MINOLTA, INC. Illuminance Spectrophotometer CL-500A] on usb-0000:00:14.0-2/input1

[ 1153.052833] systemd-hostnamed[3663]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!

2

There are 2 answers

8
Marcus Müller On BEST ANSWER

Generally, no. Device drivers are OS-specific as they have hooks where the operating system calls the driver, so you can't use a windows driver under wine, because linux is not windows and doesn't work like windows internally.

Now, there's a few exceptions, namely TWAIN scanners and CAPI telephony devices, which don't really come with OS-mode drivers, but correspond to a userland API, and hence there are Wine wrappers for those.

1
unbesiegbar On

DLL are libraries meant for Windows, you cannot use those for compilation on Linux. Wine is a software which help install executable's on Linux, but its also has limitations. Not all software's can be install as these standard libraries provided by windows doesn't exists.