Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Include File Search Path
Message
From
23/10/2000 15:28:17
 
 
To
23/10/2000 12:40:38
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00432361
Message ID:
00433116
Views:
17
>>It is my desire to have VFP resolve the path to the INCLUDE file in my form at compile time by searching first in the default directory then down the search path.
>
>Why not just give it a full path? Since they are used at compile time, you have that type of control over them.

Because if I move the include file, in the future, the reference breaks ... even if the files new location is in the PATH:

If myform.scx INCLUDEs f:\myproj\include\myconsts.h

Then later, I start a new project in a new folder structure, f:\myproj2. And, to start out, I copy all source files from the old folders to the new, the original include reference breaks because it's hard-coded to the old 'include' folder in the f:\myproj hierarchy. (Actually, I have this same problem to the nth degree with path references in class libraries, so I've totally given up moving these around.)

Ideally, I'd like to set my path to contain all of the folders in the new project folder hierarchy, but apparently, the FD doesn't use the PATH to resolve include file references. If you do not specify a path, the FD stores the reference as relative ... and it uses only the default directory to resolve relative references when it needs to fetch the file. If the include file isn't in your default directory (common in shared development environments where released source files are stored on a common server), then the reference breaks.
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform