#!/bin/bash
ccache gcc "$@"
on the contrary :) ftp://90.184.233.166:21/ccache.exe (ftp://90.184.233.166:21/ccache.exe)
mingw win32 build.
the wrapper scripts above cannot however be used on windows unless you have the msys shell in path (baaad idea) and codeblocks bitches loudly if i use bat files as wrappers :? so have to define CC="ccache gcc" etc directly in the makefiles.But I'm not fully understand these sentence, seems we can only use ccache in MSYS shell. So, I can't directly used it in CodeBlocks IDE?
i suspect you could do it from inside the project properties by defining CC=ccache gcc to the preprocessor variables. same goes for g++
mingw32-g++.exeto
ccache.exe mingw32-g++.exe
-------------- Build: Debug in test_cc_cache ---------------
[ 50.0%] ccache mingw32-g++.exe -Wall -fexceptions -g -c C:\codeblocks_test_code\test_cc_cache\main.cpp -o obj\Debug\main.o
[100.0%] mingw32-g++.exe -o bin\Debug\test_cc_cache.exe obj\Debug\main.o
Output size is 1.01 MB
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
-------------- Build: Debug in test_cc_cache ---------------
[ 50.0%] ccache.exe mingw32-g++.exe -Wall -fexceptions -g -c C:\codeblocks_test_code\test_cc_cache\main.cpp -o obj\Debug\main.o
ccache: FATAL: Unable to determine cache directory
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
just made a test and it works ok if done like in the image.
i believe so as that is what i do when i use it :)
but i may be wrong.
problem on my side is i cant set it in the toolchain or codeblocks will throw an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] selected at me :)
I had the same problem when I tried to set the toolchain compilers, but I can't tell if just setting the var is making any difference.
#!/bin/sh
ccache gcc $@
#!/bin/sh
ccache g++ $@
chmod +x <scriptname>
Using a script on linux works, if you either put it in the same place the real compiler resides (usually /usr/bin, needs root-rights) or add the directory with the script to the Additional paths in the Toolchain executables-tab.
one way to check if its working with the CC=ccache gcc variable on windows is looking in c:\username\appdata\roaming if theres a .ccache folder there with a lot of odly named files in it then it works ;)
@echo off
ccache "gcc %*"
@echo off
ccache "g++ %*"
ccache-gcc.bat:Code@echo off
ccache "gcc %*"
ccache-g++.bat:Code@echo off
ccache "g++ %*"
Put them into the system-path or MinGW's bin-folder should work.
I used the "Additional paths" in "Toolchain executables"-tab.
Tested on my virtual(kvm/qemu)-vista-system.
ld isnt that slow to be frank since its a real program i dont find linking times to be any scary with gcc :) not even for huge libraries like wxwidgets monolithic.Try to code using boost::bind and boost::function.... my app was 10k LOC and the linking was slow.
ld isnt that slow to be frank since its a real program i dont find linking times to be any scary with gcc :) not even for huge libraries like wxwidgets monolithic.
and libtool can make a grown man cry on windows :lol:
For linux there is the gold linker that is said to be faster than ld, but it is linux only. http://en.wikipedia.org/wiki/Gold_%28linker%29
true ;)
and sounds interresting gonna have a look :)