You need to follow certain procedures to move a project's location, whether you copy a project to:
- Copy all project files to the new location. You do not need to copy the subdirectories created for each configuration.
Keep the folder/directory hierarchy intact by copying the entire
project tree to the new computer. For example, if a project resides in the folder
\MyProjects\Projapp
on one computer, you can copy the contents of that directory,
and all subdirectories, to the \MyProjects\Projapp
directory on another computer.
- After copying all of the files, delete the following files from the main directory at the new
location. These files are disk- and computer-specific and should not be retained:
- *.opt files
- *.ncb files (if present)
- After copying the files, if you copied the subdirectories associated with each configuration, you need to
delete these contents of subdirectories at the new location, such as the Debug and Release subdirectories.
The files contained in these subdirectories are disk- and computer-specific files and should not be retained.
For example, Visual Fortran module (.MOD) files contained in these subdirectories should be recreated
by the Visual Fortran compiler, especially if a newer version of Visual Fortran has been installed. The
internal structure of module files can change for Visual Fortran releases.
If you copied the project files to the same system or a system running the same platform or major Visual Fortran
version, do the following steps to remove most or all of the files in the configuration subdirectory:
- Open the appropriate project workspace. In the File menu, either select Open Workspace or select
Recent Workspaces. If you use Open Workspace, select the appropriate .DSW file.
- For each configuration, select the appropriate configuration by selecting Set Active Configuration
in the Build menu.
- For the current configuration, select Clean in the Build menu.
- Repeat the previous two steps for other configurations whose subdirectories have been copied.
- If you copied the project from a PC running a Visual Fortran 5, you should open the project at its new
location using Visual Fortran 5, before you convert the project to Visual Fortran Version 6 format.
If you open a project created with Visual Fortran 5 with Visual Fortran Version 6, Visual Fortran 6
will convert the project to Visual Fortran Version 6 format. Converting the project back to Version 5
format is not easily performed (must be done manually).
If possible, open the project under Visual Fortran Version 5 after you move it, before you convert
the project to Version 6 format. This ensures that the project has been moved successfully and minimizes the
chance of conversion problems. An alternative is to make an archive copy of the Visual Fortran 5
project files before you open and convert the project to Visual Fortran Version 6 format.
- View the existing configurations. To view the existing configurations associated with the project:
- Open the project workspace. In the File menu, either select Open Workspace or select
Recent Workspaces. If you use Open Workspace, specify the appropriate .DSW file (navigate to
the appropriate project directory and double-click the .DSW file).
- Select Configurations from the Build menu.
- View the available configurations. You can also remove or add configurations.
- If you copied the project to a PC running a different platform, specify new configurations.
If you copied the project to the same system or to a system where the same major version of
Visual Fortran is installed that uses the same platform, you may not need to create any
new configurations.
If you copy the files to a different platform, opening the project reveals that the target platform
is still set to the original platform. Although this is not obvious, you can tell this is so because
the Build, Compile, and Execute options are grayed out in the Build menu. Before you can build
the application on the new platform, you must first specify one or more new configurations
for the project on the new platform.
To create Debug and Release targets for this project, you create
a new configuration while running Visual Fortran on the new platform.
The platform for a new configuration is assumed to be the current
platform. This same behavior applies when
moving projects between any two platforms.
To create a new project configuration:
- In the Configurations dialog box, click the Add button. The Add
Project Configuration dialog box appears.
- In the Configuration box, type a new configuration name.
The names do not matter, as long as they differ from existing
configuration names.
- Select the configuration from which to copy the settings for this
configuration and click OK. Usually, you will want to copy the
settings from a similar configuration. For example, if this new
configuration is a release configuration, you will usually copy
settings from an existing release configuration.
- The Projects dialog box appears with the new project configuration.
Repeat the process as necessary to create as many configurations as
you need.
- Check and reset project options.
Because not all settings are transportable across different disks, systems, or platforms, you should
verify your project settings on the new platform. To verify your project settings:
- From the Project menu, choose Settings. The Project Settings dialog
box appears.
- Review the tabs and categories to ensure that the project settings
you want are selected. Pay special attention to the following items:
- General Tab – Review the directories for intermediate and output files. If you moved the project to
a different system, be aware that any absolute directory paths (such as
C:\TEMP
or \Myproj\TEMP
) will most likely need to be changed. Instead, use relative path directory names
(without a leading back slash), such as Debug
.
- Custom Build Tab – Review for any custom commands that might change
between platforms.
- Fortran and Linker tabs – Nonstandard options in the original configurations must be
replicated (as applicable) in the new configurations.
For example, if you moved a project from a
Windows NT Alpha system running Visual Fortran 6.5A or earlier, a few Alpha-only compiler options
are either not needed (such as /synchronous_exceptions and /granularity) or are not available
on ia32 systems (such as /rounding_mode, /pipeline, and /math_library:accurate). You also
might find new compiler options that might benefit your application
(see Compiler Options).
- Pre-link and Post-build Step tabs – Review for any custom commands
that might change between platforms.
- If you are copying your project between systems, check your source code for directory paths referenced
in INCLUDE or similar statements. Developer Studio provides a multi-file search capability
called Find in Files, available from the Edit menu.