On Wed, 25 May 2011 11:50:37 +1000, Lex wrote:
On 25 May 2011 11:34, Chris Sutcliffe ir0nh34d@gmail.com wrote:
On 24 May 2011 21:23, Lex Trotman wrote:
Why not just use the absolute pathname of the executable?
PS Thats so obvious I presume you have tried it and I guess I am asking why doesn't it work, does it work on the command line?
That`s not the issue (and that solution would work in most cases). The issue is I have a common Makefile for both architectures that I use (it calls gcc/g++), which works well because I set the path prior to calling make and the appropriate compiler is used. I guess I could pass which compiler to use to make, which would resolve the issue.
I would always recommend an explicit parameter over hidden things like setting PATH, makes it more maintainable and less fragile.
I'd second this. For both way, you can use a set of commands as Lex already mentioned (the build system guru himself :D). So, this is nothing new, just a bit more detailed. To make the commands use the right tool, you can set environment variables in the command itself, like:
TARGET=mingw32 make.exe
I should note that this works fine on Linux, I didn't try it on Windows. But it's worth a try and quite easy.
Regards, Enrico