Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Paths issue in VF project

john_humble1
Beginner
363 Views

Over several years I've developed quite a number of projects within a dozen or so workspaceslocatedina Windows folder"c:Program FilesMicrosoft Visual StudioMy Projects" . Most workspaces contain only one project but a couple of them contain several. All projects use various source and object files contained in a subfolder MyLib. I've been using this system on three different computers, each using the same file structure, and all has been well.

I now need to install the system on a server, for which "c:Program Files" must be replaced with "k:Folder1Subfolder"."k:" is a mapped drive. "My Projects", and everything inside it, would remain in the same relative structure as before and would be placed in "Subfolder". As far as I can see all the addressing within the various resource files, links, etc is absolute, making a simple transfer impossible. Is there any simple way that the transfer can be achieved without rebuiding everything from scratch? In particular, I need to try to future-proof the new arrangement against later changes to the server configuration. Such changes are beyond our control and are highly likely. Relative addressing, if allowable, would solve the problem entirely, but I've not seen how to do it. Have I missed something obvious?

I'm using Win 2000 and XP, and CVF 6.6 (which shows how long the project has been running!)

Any suggestions would be appreciated

John

0 Kudos
3 Replies
Jugoslav_Dujic
Valued Contributor II
363 Views
Erm, as far as I can tell, Visual Studio tends to store paths as relative for most things; the most relevant file is the .dsp file (it's a plain text file), and its location (i.e. project directory) is the base path. If you have a plenty of absolute paths around, I'd say it's mostly your fault, eh Open-mouthed smiley [:-D]. I understand it's not always easy to get relative paths right for such complex setups where multiple workspaces depend on each other's output, but it's doable.

So, you should be able to "relativize" everything by a smart find/replace (mostly) across .dsp files. For example, see the attached pair of my .dsp files (with fairly complex dependencies). The directory structure is like:

Xeffort.dsw
Xeffort.dsp
IncludeCVF
LibCVF
BinCVF
XWizard
XWizard.dsp
TempCVF
DebugXeffort
DebugWizard
ReleaseXeffort
ReleaseWizard

Xeffort.dsp (static library) is set up so that (Release version, Debug is different):

  • .obj and .sbr files go to ../TempCVF/ReleaseXeffort folder
  • .lib file goes to ./LibCVF
  • .mod files go to ./IncludeCVF
XWizard.dsp (exe dependent on Xeffort.lib) is set up (Release version) so that:
  • .mod, .obj and .sbr files go to ../../TempCVF/ReleaseWizard folder
  • .exe goes to ../BinCVF/XWizard.exe
  • Input modules (from Xeffort.lib) are taken from ../IncludeCVF
  • Input library (Xeffort.lib) is taken from ../LibCVF
The point of such setup is that all temporary junk (.sbr, .obj, .pdb, .res) goes out of , which should ultimately contain just "clean" source, .libs and .mods, and could be anywhere on the disk or the network.

So, if you're careful enough, you can edit your .dsp files in text mode, or (somewhat more slowly) go through each Project settings from the IDE and modify them accordingly.

0 Kudos
Steven_L_Intel1
Employee
363 Views
Jugoslav is correct, but I have seen projects from customers with absolute paths in them which I don't understand how they got there. Most of the time, all of the project file paths will be relative.
0 Kudos
john_humble1
Beginner
363 Views

Thanks Jugoslav and Steve. I'm not sure either how I ended up with absolute paths, butyour advice has set me on the right track to fix them up.

Grateful thanks John

0 Kudos
Reply