4

I'm trying to get Vcpkg user-wide bash integration following the official instructions. here are the steps I took:

  1. git clone https://github.com/Microsoft/vcpkg.git
  2. cd vcpkg
  3. ./bootstrap-vcpkg.sh
  4. ./vcpkg integrate install

Applied user-wide integration for this vcpkg root.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake"

  1. ./vcpkg integrate bash

Unable to read /Users/<user>/.bashrc

  1. touch /Users/<user>/.bashrc and repeat step 5

Adding vcpkg completion entry to /Users/<user>/.bashrc

  1. mv /Users/<user>/.bashrc /Users/<user>/.bash_profile

However, now when I run vcpkg or ./vcpkg in new terminals I get:

-bash: vcpkg: command not found

I would appreciate it if you could help me know what is the problem and how I can resolve it.

My environment is:

  • macOS Catalina version 10.15.4
  • GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)

P.S. I was asked here to show the content of the .bash_profile is:

source /path/to/vcpkg/scripts/vcpkg_completion.bash
Community
  • 1
  • 1
Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193

1 Answers1

5

A temporary solution was to add the line:

export PATH=/path/to/vcpkg:$PATH

to the .bash_profile. Wonder why the above installation/integration scripts don't do this automatically!

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193