LibUsbDotNet在linux上的使用

前置條件: 安裝  libusb  mono編譯環境

下載LibUsbDotNet源碼後 :

  1. xbuild LibUsbDotNet.sln。

然後你就可以mono xxx.exe 。進行相關開發了

反正很魔幻 在linux上編譯exe 然後在window上配置mono環境 然後就可以兩邊跑exe。

ps: 安裝方法來自LibUsbHelp.chm(libusb安裝包裏面的)

LibUsbDotNet 2.2.8
Getting Started With Linux

C#Visual BasicVisual C++

 

LibUsbDotNet is compatible with linux/unix-like operating systems that support mono.net 2.0 and libusb v1.x.

Prerequisites

Note:

The user must have appropriate access permissions to the usb device before it can be used with linux. This is true for most unix-like OSes.

  1. If your platform has its own package manager (Aptitude, Synaptic, etc), use it to download and install the required software packages below.

  2. Download and install the libusb-1.0 package.

    If libusb-1.0 binaries do not exists for your platform, you must build them from source. Building libusb-1.0 from source is very straightforward. See the INSTALL documentation file in the libusb-1.0 source package for more details.

  3. Download and install the Mono.Net 2.x package.

    The pre-compiled Mono.Net runtime binaries are available for nearly all platforms. However, for information on bulding the mono.net runtime from source see Compiling_Mono.

Using the pre-built LibUsbDotNet Binary package.

  1. Download the LibUsbDotNet_Bin package and unzip it to a new sub-directory (LibUsbDotNet_Bin).

  2. Open a terminal window and navigate to the new LibUsbDotNet_Bin directory.

  3. Run the Test_Info application by typing: mono Test_Info.exe

    Test_Info should find all USB devices the user has access to and provides a device count in the status bar. If no devices are found, verify the user has sufficient access permissions, or try running as the root user.

Building LibUsbDotNet From Source

  1. Download the LibUsbDotNet_Src package and unzip it to a new sub-directory (LibUsbDotNet_Src).

  2. Open a terminal window and navigate to the new LibUsbDotNet_Src directory.

  3. The LibUsbDotNet.sln can be built with the xbuild tool:

    xbuild LibUsbDotNet.sln

     

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章