Skip to content

Building on Windows

aushacker edited this page May 13, 2020 · 4 revisions

Created 1 December 2014

Updated 13 May 2020

To build YAD2XX from source on Windows 7/8 (and presumably 10) you need to install and configure several tools to build the two modules, the Java Library (.jar file) and the Native Library (.dll).

Java Library

Install the following software, parenthesised values have been tested:

  1. Java 7 8 (1.7.0_67 1.8.0_181)
  2. Maven 3 (3.2.3 3.5.4)
  3. Git client ()

Update the Windows Environment Variables manually to include the install locations e.g:
JAVA_HOME=c:\Program Files\Java\JDK1.8.0_181
MAVEN_HOME=c:\apache\apache-maven-3.5.4
PATH={existing PATH};%JAVA_HOME%\bin;%MAVEN_HOME%\bin;

You can sanity check your setup from the Windows Command Line:

  1. "java -fullversion" -> outputs the Java version
  2. "mvn --version" -> outputs the Maven version

Checkout the source code and build:

  1. Open a Windows Command Line window
  2. Change to your work directory e.g. "cd c:\Users\me\workspace"
  3. "git clone https://github.com/aushacker/yad2xx.git"
  4. "mvn install"

First time through this will take a while because Maven will download and cache its plugins. You should ultimately get a FAILURE attempting to build the DLL but the top level and Java Library modules should indicate SUCCESS.

If other errors occur then first check the steps above. If it still fails then raise a ticket.

Native Library

The Native library (.dll) needs a C compiler and the FTDI supplied files for the D2XX library.

The gcc C compiler is readily available. Install MinGW64

  1. Version - 8.1.0
  2. Architecture - x86_64
  3. Threads- win32
  4. Exception - seh
  5. Build version - 0

To correctly compile and link you need the FTDI supplied header and library files. Installing the FTDI D2XX driver puts the runtime library in the correct location for using the device. It does not setup the develpment environment.

  1. Download and extract the FTDI D2XX driver for 64 bit windows. I tested 2.12.28.
  2. Create a directory to store the FTDI developer files, e.g. C:\Users<user>\d2xx
  3. Copy the dynamic library from amd64\ft2dxx.lib to C:\Users<user>\d2xx
  4. Add a Windows Environment Variable - D2XX_HOME=C:\Users<user>\d2xx

Open a MinGW terminal session and rerun the "mvn install" command. The native library should now build successfully.

The newly created library needs to be copied to C:\Windows\System32.

Clone this wiki locally