Hi Tomluan,
Yes it is possible to execute distcc on Windows operating system, but
not from scratch...
You may install cygwin on a Windows computer with the distcc package.
Afterward you will just need the following files:
cygpopt-0.dll
cygwin1.dll
distcc.exe (4 host)
distccd.exe (4 server)
you can add all this files into an directory and declare it in your
%Path% variable.
Now most of the Windows make do not natively support distcc because
windows can not handle /cygdrive/
So you got to possibilities:
1. using cygwin to compile your project.
2. writing a wrapper to you compiler call (see example.c) where you
define the path of your compiler.
now you should be ready to define the following environement variables:
DISTCC_DIR=c:/tmp/distcc
CCACHE_DIR=c:/tmp/ccache (optional just if you want to use CCache)
TMPDIR=c:/tmp
PATH=c:\Programme\distcc;....
you can launch the distcc on your servers:
distccd --allow 172.16.128.0/24 --allow 172.16.126.0/24 --daemon
--log-file=c:/tmp/distcc/logdistccd.txt --nice 6 --no-detach
in a hosts file (located in DISTCC_DIR) do not forget enter your
different hosts starting with localhost.
I hope this could help you
Sincerely yours
--
Eric
2008/10/8 Tomluan <[email protected]>:
> Dear friends,
>
> The software of distcc is very good and nice tools for distribution
> compiling.
>
> I am a new user of distcc and get a question for it.
>
> I just found the installation packet for several linux OS.
>
> Is it possible to execute the distcc on windows operation system ??
>
> Thanks lot for your help.
>
> Best Regards.
// cppppc.cpp : Definiert den Einsprungpunkt für die Konsolenanwendung.
//
//# ifdef _WINDOWS
#include "stdafx.h"
//#endif
#include <stdlib.h>
//#include <stdio.h>
#include "string.h"
#ifdef _LINUX
static const char mycppcompiler[] = "/usr/bin/g++\0";
static const char myccompiler[] = "/usr/bin/gcc\0";
#else
static const char mycppcompiler[] = "C:/Programme/windriver_pid_3_4/gnu/3.4.4-vxworks-6.4/x86-win32/bin/c++ppc.EXE\0";
static const char myccompiler[] = "C:/Programme/windriver_pid_3_4/gnu/3.4.4-vxworks-6.4/x86-win32/bin/ccppc.EXE\0";
#endif
// this function get the string length of every argument passed to the executable
int get_sizeof_args(int argc, char* argv[])
{
int argsize = 0;
int i = 0;
for (i = 0; i < argc; i++)
argsize += strlen(argv[i]);
return argsize;
}
int main(int argc, char* argv[])
{
int i = 0;
char *strtmp = 0;
char *compilercall = 0;
const char mycompiler[] = "C:/Programme/windriver_pid_3_4/gnu/3.4.4-vxworks-6.4/x86-win32/bin/ccppc.EXE\0";
char *occur = 0;
int strtmplen = 0;
int occurpos = 0;
int result = 0;
int argsize = 1; // for \0
argsize = get_sizeof_args(argc, argv) + strlen(mycompiler);
compilercall = (char *) malloc(argsize * sizeof(char));
compilercall = strcpy(compilercall, mycompiler);
for (i = 1; i < argc; i++)
{
strtmplen = strlen(argv[i]);
strtmp = (char *) malloc((strtmplen + 1) * sizeof(char));
if (0 != (occur = strstr(argv[i], "/cygdrive/")))
{
occurpos = (int)(occur - argv[i]);
strtmp = strcpy(strtmp, "c:");
strtmp = strcat(strtmp, argv[i] + 11);
}
else
strtmp = strcpy(strtmp, argv[i]);
compilercall = strcat(compilercall, " ");
compilercall = strcat(compilercall, strtmp);
free(strtmp);
}
//printf("compiler call: %s\n", compilercall);
result = system(compilercall);
free(compilercall);
return result;
}__
distcc mailing list http://distcc.samba.org/
To unsubscribe or change options:
https://lists.samba.org/mailman/listinfo/distcc