-
Notifications
You must be signed in to change notification settings - Fork 0
IDE Setup
Michael Hollister edited this page Nov 16, 2015
·
1 revision
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.
- 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.
- Create a ".gitignore" file:
- 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.
- Type 'cd C:\PROJECT_PATH' where PROJECT_PATH is the path where the repository is stored.
- Type 'echo * > .gitignore'. This will prevent local project files to be committed to the repository.
- Setup IDE project
- Create a new Visual C++ Empty Project template and store the project in the 'Local' directory you created earlier.
- Right-click the project file in solution explorer and click properties.
- Under 'Configuration Properties', click 'VC++ Directories'
- Under 'Include Directories', click edit in the drop-down box and add the path "C:\PROJECT_PATH\Include" and click OK to save changes.
- After that, you can add existing header files and source files by right-clicking those folders in solution explorer and clicking add existing item.
- 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.
- Right-click the project file and click build options.
- With the debug build configuration options, click 'Search directories' and add the path "C:\PROJECT_PATH\Include" and click OK to save changes.
- After that, you can add existing header files and source files by right-clicking the project file and clicking "add files..."