Change step 7. to refer to VCVARS.
Also adds a note about the `CPAL_ASIO_SDK` environment variable determining whether or not cpal will attempt to build ASIO and generate bindings to it.
This commit is contained in:
parent
0ff0b65647
commit
b70e27ed87
24
README.md
24
README.md
|
@ -44,6 +44,8 @@ WASAPI. To do so, follow these steps:
|
|||
3. Assign the full path of the `ASIOSDK2.3.1` directory to the `CPAL_ASIO_DIR`
|
||||
environment variable. [How to set persisting Environment Variables on
|
||||
Windows](https://gist.github.com/mitchmindtree/92c8e37fa80c8dddee5b94fc88d1288b#file-windows_environment_variables-md).
|
||||
The existence of the `CPAL_ASIO_DIR` environment variable determines whether
|
||||
or not CPAL will attempt to build the ASIO SDK and generate bindings to it.
|
||||
4. **Download and install LLVM** from
|
||||
[here](http://releases.llvm.org/download.html) under the "Pre-Built Binaries"
|
||||
section. The version as of writing this is 7.0.0.
|
||||
|
@ -57,15 +59,19 @@ WASAPI. To do so, follow these steps:
|
|||
and install ASIO4ALL**](http://www.asio4all.org/). Be sure to enable the
|
||||
"offline" feature during installation despite what the installer says about
|
||||
it being useless.
|
||||
7. **Use the correct command prompt** to build cpal and run examples. In my
|
||||
case, I had to run a specific command prompt, otherwise rust-bindgen would
|
||||
fail to find some of the necessary build tools. To do this, I went to the
|
||||
`Start Menu > Visual C++ Build Tools > Visual C++ 2015 x64 Native Build Tools
|
||||
Command Prompt` and ran this prompt. The exact prompt you need might differ
|
||||
based on your machine's architecture and how you installed your Visual C++
|
||||
tools. There must be an easier solution to this (especially as not everyone
|
||||
wants to build projects from the command line).
|
||||
8. Select ASIO as the backend at the start of our program with the following:
|
||||
7. **Loading VCVARS**. `rust-bindgen` uses the C++ tool-chain when generating
|
||||
bindings to the ASIO SDK. As a result, it is necessary to load some
|
||||
environment variables in the command prompt that we use to build our project.
|
||||
On 64-bit machines run:
|
||||
```
|
||||
"C:\Program Files (x86)Microsoft Visual Studio 14.0VC\vcvarsall" amd64
|
||||
```
|
||||
On 32-bit machines run:
|
||||
```
|
||||
"C:\Program Files (x86)Microsoft Visual Studio 14.0VC\vcvarsall" x86
|
||||
```
|
||||
8. Select ASIO as the backend at the start of our program with the following
|
||||
code:
|
||||
|
||||
```rust
|
||||
#[cfg(target_os = "windows")]
|
||||
|
|
Loading…
Reference in New Issue