User forums > Using Code::Blocks
How to run a .bat at CB start-up to define env variables in CB scope?
J.:
I want to apply that to where MSVC's vcvars32.bat is called to define env variables required for compilation with Microsoft's cl.exe / link.exe.
Currently I am working with a .bat wrapper calling vcvars32.bat each time cl.exe or link.exe is called ... very time inefficient.
Living on Win10 with CB16.01.
Thanks,
J.
oBFusCATed:
What do you really want to achieve?
Run msvc++ inside C::B?
J.:
Yes - and in addition the question for other questions and probably the first one: How to get env variables dynamically defined in some script to make them available in CB scope?
oBFusCATed:
1. Just setup your msvc++ inside C::B as a compiler and use it in your projects. The vcvars32.bat is not really needed. C::B can emulate it.
2. Do you need these variables for something else than the debugger?
J.:
How does this set up work for all the paths to be set and required by cl and link? This task is silently and - I guess - reliably done by vcvars32.bat. Any manual fiddling with paths calls for errors and potential incompleteness I think.
The question is more general of how to set up env vars at CB start-up to provide dynamically set env paths. I would be interested not only to use it with the debugger where the env var(s) might change for every gdb start during one single CB session.
Is it possible to run the .bat simply before calling the CB exe when firing it up? Just an idea coming to my mind right now.
Navigation
[0] Message Index
[#] Next page
Go to full version