Mike Jones
Mike Jones

Reputation: 135

Visual Studio cross platform makefile project, command not found

I'm trying to build a cross platform project for Ubuntu. In my makefile I have the line

"PSPSDK=$(shell psp-config --pspsdk-path)"

which gives the error "psp-config: Command not found."

psp-config is in my path and running make from the Ubuntu system on the files that get copied over from Visual Studio works fine. It also works if I manually ssh into the Ubuntu system from windows and run the command from there.

Why can't it find the command when run through Visual Studio?

Upvotes: 1

Views: 220

Answers (1)

dewaffled
dewaffled

Reputation: 2973

You should update PATH at the beginning of "~/.bashrc" file (and not at the end) because it starts with somethign like:

# If not running interactively, don't do anything
case $- in
    *i*) ;;
    *) return;;
esac

Also, if you add code before these lines, it will be invoked for every subshell execution, so it is better to add a guard for it as well so it is invoked only once per session:

if [ -z $HOME_OPT_PATH_SET ]; then
    export PATH=$PATH:$HOME/opt
    export HOME_OPT_PATH_SET=1
fi

# If not running interactively, don't do anything
...

Upvotes: 1

Related Questions