One nice feature would be the ability to set environment variables in a project file. Specifically, I have 2 MinGW compilers (32-bit and 64-bit) on my system, both of which have gcc.exe/g++.exe. What would be nice would be the ability to create a project that sets PATH accordingly so that I could have a specific project / compiler.
Is there any way to do this with existing functionality?
thank you,
Chris
On 25 May 2011 10:38, Chris Sutcliffe ir0nh34d@gmail.com wrote:
One nice feature would be the ability to set environment variables in a project file. Specifically, I have 2 MinGW compilers (32-bit and 64-bit) on my system, both of which have gcc.exe/g++.exe. What would be nice would be the ability to create a project that sets PATH accordingly so that I could have a specific project / compiler.
Is there any way to do this with existing functionality?
thank you,
Hi again, how would the project know which PATH to set?
Instead you could have two project files, one called my_world_domination_project_32_bit.geany and one my_world_domination_project_64_bit.geany with different commands in them.
Otherwise use the hidden preference to increase the number of commands and have both sets (clearly labeled) in one project.
Cheers Lex
Hi Lex,
On 24 May 2011 20:45, Lex Trotman wrote:
On 25 May 2011 10:38, Chris Sutcliffe wrote:
One nice feature would be the ability to set environment variables in a project file. Specifically, I have 2 MinGW compilers (32-bit and 64-bit) on my system, both of which have gcc.exe/g++.exe. What would be nice would be the ability to create a project that sets PATH accordingly so that I could have a specific project / compiler.
Is there any way to do this with existing functionality?
Hi again, how would the project know which PATH to set?
Instead you could have two project files, one called my_world_domination_project_32_bit.geany and one my_world_domination_project_64_bit.geany with different commands in them.
That's exactly what I would like to do (I guess I didn't explain myself well :) ). How do I set up the projects such that they call the appropriate gcc/g++?
Cheers,
That's exactly what I would like to do (I guess I didn't explain myself well :) ). How do I set up the projects such that they call the appropriate gcc/g++?
Why not just use the absolute pathname of the executable?
Cheers Lex
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?
Cheers,
-- Chris Sutcliffe http://emergedesktop.org http://www.google.com/profiles/ir0nh34d _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
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.
Cheers,
Chris
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.
Cheers Lex
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