-
Notifications
You must be signed in to change notification settings - Fork 8
Building on Windows
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).
Install the following software, parenthesised values have been tested:
- Java
78 (1.7.0_671.8.0_181) - Maven 3 (
3.2.33.5.4) - 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:
- "java -fullversion" -> outputs the Java version
- "mvn --version" -> outputs the Maven version
Checkout the source code and build:
- Open a Windows Command Line window
- Change to your work directory e.g. "cd c:\Users\me\workspace"
- "git clone https://github.com/aushacker/yad2xx.git"
- "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.
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
- Version - 8.1.0
- Architecture - x86_64
- Threads- win32
- Exception - seh
- 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.
- Download and extract the FTDI D2XX driver for 64 bit windows. I tested 2.12.28.
- Create a directory to store the FTDI developer files, e.g. C:\Users<user>\d2xx
- Copy the dynamic library from amd64\ft2dxx.lib to C:\Users<user>\d2xx
- 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.