C - Command Line Compilation

1. Download the C Source Only download for your OS.

2. Ensure that you have a gcc C compiler installed. For windows, we recommend using MinGW

3. Type the following incantations to compile the program:

  • Windows: gcc -o programName programName.c Finch.c hidapi.dll
  • Mac: gcc -pthread -o programName programName.c Finch.c libhidapi.dylib
  • 64-bit Linux: gcc -pthread -o programName programName.c Finch.c -lhidapi64
  • 32-bit Linux: gcc -pthread -o programName programName.c Finch.c -lhidapi32

4. To run the program:

  • Windows: simply type your program's name with no extensions. You may hit a runtime bug complaining about a missing msvcr100d.dll file. You can download the file here.
  • Mac: Type ./ followed by your program's name.
  • Linux: Type ./ followed by your program's name. 
  • You will need to install libusb-1.0. To do so, run sudo apt-get install libusb-1.0-0-dev in any terminal window.
  • You will need to run a script prior to running the Finch for the first time. Make it executable by typing chmod +x Configure and then run sudo ./Configure in the top level directory of the download.