Ask Your Question
2

How to install RtMidi.h in Visual Studio 2019?

asked 2021-09-06 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-03-18 05:00:00 +0000

lalupa gravatar image

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/rtmid…

  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.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-09-06 11:00:00 +0000

Seen: 16 times

Last updated: Mar 18 '22