How to set up and use ccache (with cygwin) on windows?

送分小仙女□ 提交于 2020-02-01 09:15:43

问题


I am not able to set up Ccache on Windows using Cygwin.

What do i want to do ? I want to install CCache on a Windows PC so i could use it to compile C and C++ projects.

I have almost no Knowledge about C/C++ and the whole GCC/G++ Compiler thing.
main sources for my approaches:
- https://wiki.archlinux.org/index.php/ccache
- http://charette.no-ip.com:81/programming/2016-02-07_CCache/index.html
- https://askubuntu.com/questions/470545/how-do-i-set-up-ccache

Ccache is made for Unix-systems only so in order to get the bash commands i installed Cygwin for windows.
I have also installed MinGW32 on my C:/ drive. In Cygwin I installed the following packages: (View: Picked)

- autoconfig                    13-1
- ccache                        3.1.9-2
- ccache-debuginfo              3.1.9-2
- fish                          2.7.0-1
- gcc-tools-epoch2-autoconf     2.64-2
- gperf                         3.1-1
- libgcc1                       7.4.0-1
- make                          4.2.1-2
- mingw64x86_64-gcc-core        7.4.0-1
- mingw64x86_64-gcc-debuginfo   7.4.0-1
- mingw64x86_64-gcc-g++         7.4.0-1

After the installation i can use "ccache -V" inside Cygwin and it tells me i got version 3.1.9

according to the tutorials i am following i should get:

/usr/lib/ccache/gcc 
/usr/lib/ccache/g++

if i type the command: "which gcc g++".
But i am getting as default the following:

/cygdrive/c/mingw/bin/gcc
/cygdrive/c/mingw/bin/g++

So i wanted to change the path. But the structure of ccache inside cygwin seems to be way different then it is when you install it with sudo on a unix machine.
I cant find any gcc or g++ compilers inside ccache or at all in cygwin.
But ccache is also not at usr/lib/ccache in cygwin. If i type in "which ccache" it gives me the path usr/bin/ccache.

I am out of ideas and it seems like i just dont have enough knowledge about C compilers in general to get an idea of what to do / where to search.

来源:https://stackoverflow.com/questions/55610898/how-to-set-up-and-use-ccache-with-cygwin-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!