Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To install RtMidi.h in Visual Studio 2019, follow these steps:

  1. Download the RtMidi library from the official website: https://www.music.mcgill.ca/~gary/rtmidi/

  2. Extract the downloaded zip file to a location on your computer.

  3. Open Visual Studio 2019 and create a new project.

  4. Right-click on your project in the Solution Explorer and select "Properties" from the context menu.

  5. In the Properties window, select "VC++ Directories" from the left-hand menu.

  6. Under "Include Directories", click on the "Edit" button and add the path to the RtMidi header files. This is typically the "include" folder within the extracted RtMidi directory.

  7. Click on "OK" to save the changes.

  8. Under "Library Directories", click the "Edit" button and add the path to the RtMidi library files. This is typically the "lib" folder within the extracted RtMidi directory.

  9. Click on "OK" to save the changes.

  10. Now, you can include the RtMidi header files in your C++ code by adding the following line at the top of your file:

include <rtmidi.h>

  1. Finally, link the RtMidi library to your project by adding the following line at the top of your source file:

pragma comment(lib, "RtMidi.lib")

or

Add this in Project -> Properties -> Linker -> Input -> Additional Dependencies RtMidi.lib

  1. Build your project to make sure everything is working correctly.