You are not logged in.
Pages: 1
Hi guys;
My install cache <= https://wiki.archlinux.org/index.php/Ccache
My default shell = zsh.
Extra add:
export CCACHE_TEMPDIR="$HOME/.ccache"
export USE_CCACHE=1
export CC="ccache gcc"
export CXX="ccache g++"
alias gcc="ccache gcc"
alias g++="ccache g++"
alias cc="ccache cc"
alias c++="ccache c++"
I Compile any software with terminal
$ g++ main.cpp -lsfml-graphics -lsfml-window -lsfml-system
main.cpp: In function ‘int main()’:
..........................................
No problem.
Now
add compile.sh
#!/bin/bash
g++ main.cpp -lsfml-graphics -lsfml-window -lsfml-system
Run terminal
$ ./compile.sh
open3: exec of ccache g++ main.cpp -lsfml-graphics -lsfml-window -lsfml-system failed: No such file or directory at /usr/lib/colorgcc/bin/g++ line 246.
Another example
Run make
$ make
Can't exec "ccache gcc ": No such file or directory at /usr/lib/colorgcc/bin/gcc line 240.
Couldn't exec at /usr/lib/colorgcc/bin/gcc line 240.
make: *** [Makefile:91: test_build] Error 2
Why can not I compile with a script?
What is the problem?
Offline
you probably want to source the .zshrc (or the file where you define those variables) within the compile.sh script
sudo yaourt -Syua
Offline
Pages: 1