Skip to content
Michael Hollister edited this page Nov 16, 2015 · 1 revision

IDE Setup

This guide will show one example workflow on how to setup compiling the project in windows with Visual Studio and Code::Blocks. Although this will allow autocomplete and compiling to work in the editor, you will receive errors like 'unresolved externals' or 'undefined reference' when the compiler tries to link the library functions called in the code. There is no way around this error since the libraries are meant for the Raspberry Pi or Linux operating systems. However, this setup allows the compiler to check for syntax errors and the code then can be directly built from the Raspberry Pi.

Development Environment Setup

  1. Create a directory in the project root ("Raspberry-Pi-Digital-Piano") named "Local". The purpose of this is to allow the each contributor to use the IDE of his/her preference without pushing IDE project files to Github.
  2. Create a ".gitignore" file:
  3. Press 'Windows' + R and type 'cmd' to open command prompt. This method is needed since windows explorer does not allow you to create a file of this type of name.
  4. Type 'cd C:\PROJECT_PATH' where PROJECT_PATH is the path where the repository is stored.
  5. Type 'echo * > .gitignore'. This will prevent local project files to be committed to the repository.
  6. Setup IDE project

Visual Studio (2015 Community)

  1. Create a new Visual C++ Empty Project template and store the project in the 'Local' directory you created earlier.
  2. Right-click the project file in solution explorer and click properties.
  3. Under 'Configuration Properties', click 'VC++ Directories'
  4. Under 'Include Directories', click edit in the drop-down box and add the path "C:\PROJECT_PATH\Include" and click OK to save changes.
  5. After that, you can add existing header files and source files by right-clicking those folders in solution explorer and clicking add existing item.

Code::Blocks

  1. Create a new empty project and store the project in the 'Local' directory you created earlier. You can use the default compiler debug and release configuration.
  2. Right-click the project file and click build options.
  3. With the debug build configuration options, click 'Search directories' and add the path "C:\PROJECT_PATH\Include" and click OK to save changes.
  4. After that, you can add existing header files and source files by right-clicking the project file and clicking "add files..."
Clone this wiki locally