Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Setting intermediate files path to a global folder using an environment variable

Setting intermediate files path to a global folder using an environment variable

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpworkspacedebuggingannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jean Marc Molina
    wrote on last edited by
    #1

    Hello, I would like to set the intermediate files path from the Project Settings > Settings For > Win32 Debug/Release > General tab to a global folder. It would allow me to build my projects in a temporary folder that I can delete and clean up any time without deleting nor affecting my working projects. Its default value is Debug or Release, depending of the configuration you select, Win32 Debug or Win32 Release (for a MFC application). I created an environment variable named "vcc_tmp". Using the command line I can change the current directory to that folder using "chdir %vcc_tmp%". Windows knows that it has to replace %vcc_tmp% by its value. So I tried it with VC++ but it doesn't replace the variable by its value, "%vcc_tmp%\MyApp\Debug" doesn't work. It creates a new folder named "%vcc_tmp%". The problem is that a lot of people are working on many projects. Lot of people, lot of projects. So I can't affort choosing "static" path for all these projects. Each developers would have to create an environment variable "vcc_tmp" and set it to its temp folder. I don't want to choose "c:\vcc_tmp" as some people can't use their c: drive to store temp files. Moreover using the OS drive as a tmp drive is not a good idea, defrag, scan... No no no :). So if you have any remarks and suggestions or solutions, don't hesitate to reply to that thread. All help is welcome. Kind regards, JM. Molina Earth > Europe > France > Lyon

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups