Menu

#348 env. vars in paths

open
nobody
None
5
2012-09-26
2005-01-25
aditsu
No

I'd like to use environment variables for the exe and
object
output dirs (in build options); I tried a few things but it
didn't work.
It would be good to check other places too (where paths
are involved).

Discussion

  • Marek Januszewski

    Logged In: YES
    user_id=609236

    can you give me an example?

     
  • aditsu

    aditsu - 2005-02-21

    Logged In: YES
    user_id=682737

    an example of what?
    of what I tried, or of other places where paths are involved?

     
  • Marek Januszewski

    Logged In: YES
    user_id=609236

    of what you tried.

    I usually use ${SOMEVAR} in makefile

     
  • aditsu

    aditsu - 2005-03-02

    Logged In: YES
    user_id=682737

    I tried things like ${devcpath}\lib, $(devcpath)\lib,
    %devcpath%\lib, etc. for the exe output dir, and every time
    Dev-C++ cried that it can't create the folder
    (I want to compile a library and put the result in the lib
    folder, and I have an env. variable called "devcpath" which
    is currently set to "c:\dev-cpp")

    Adrian

    P.S. Dev-C++ should NOT try to create those folders
    automatically if they don't exist!

     
  • Marek Januszewski

    Logged In: YES
    user_id=609236

    interesting problem
    I have system variable %WINDIR% (as anyone else)
    and I got it working like that in C++ compiler parameters
    window:
    -I$(shell echo %WINDIR%)

    I'll try some more things...

    I don't get the can't create folder message - where are you
    putting those?

     
  • aditsu

    aditsu - 2005-03-02

    Logged In: YES
    user_id=682737

    I tried $(shell echo %devcpath%)\lib and Dev-C++ still
    didn't like it (and it looks awful anyway)
    As I said, I put those things in the executable output
    directory (in project options - build options)

    Adrian

     
  • Marek Januszewski

    Logged In: YES
    user_id=609236

    I've just discovered that in macros.pas there are procedures
    that replace strings with <...> to actual paths. For example
    old sdl 1.2.4 devpak in compiler window has:
    -I"<INCLUDE>\SDL" -Dmain=SDL_main
    which in makefiles becomes:
    -I"C:\Dev-Cpp\include\SDL" -Dmain=SDL_main

    parsed fields are compiler window, c++ compiler and default text

    this code has been there for a while

    for other vars check macros.pas. It seems like you can
    create your own "macros".

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.