Author Topic: Using environment variables in 'Build target files'  (Read 2975 times)

rodrigo.canellas

  • Guest
Using environment variables in 'Build target files'
« on: September 24, 2007, 08:50:55 pm »
Hi,

I would like that every file in 'Build target files' list would be in the form "$(DVP_SRC)\path\subpath\filename.cpp", instead of "..\..\..\path\subpath\filename.cpp".

Is there a way of doing it, other than editing the '.cbp' project file?


Thanks!

rodrigo.canellas

  • Guest
Re: Using environment variables in 'Build target files'
« Reply #1 on: September 24, 2007, 08:57:21 pm »
Actually, it is necessary more than just to be listed this way.

When compiling, the compiler complained that a 'c:\pathA\pathB\$(DVP_SRC)\path\subpath\filename.cpp' could not be found.

So, the path informed to the compiler is the full path, and not the relative.

Thanks again!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Using environment variables in 'Build target files'
« Reply #2 on: September 25, 2007, 11:40:29 am »
Regarding your first post, I don't think this is possible without editing the project file by hand, and even then it might not work (this depends on the time variables are expanded, I don't remember when they are).

Regarding your second post, it would be interesting to see the full commandline and compiler output for that file (make sure logging is set to "full commandline" in compiler options (rightmost tab), and post the result here).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."