Groups > dBase > dBase programming > Re: #include and Source Aliases




#include and Source Aliases

#include and Source Aliases
Mon, 07 Apr 2008 06:49:34 -040
I have assed source aliases in my project code to eliminate path names and make
the project more portable but i also need to the same source aliases in some
#include statement so that everything stays consistent.

I tried 

#include :ProjectConstants:\Constants.h
#include ":ProjectConstants:\Constants.h"
#include :ProjectConstants:"\Constants.h"

but they do not work. Any suggestions

Post Reply
Re: #include and Source Aliases
Mon, 07 Apr 2008 13:48:23 +010
tom gormley wrote:
> I have assed source aliases in my project code to eliminate path
> names and make the project more portable but i also need to the same
> source aliases in some #include statement so that everything stays
> consistent.

I assume you have a standard place where you do your work, a standard 
working directory.

I suggest you create a subdirectory of your working directory, for each 
of your source aliases and named after that source alias.    Then your 
include statement would be a relative path and not dependent on any dBL 
code:

#include ProjectConstants\Constants.h


Post Reply
Re: #include and Source Aliases
Tue, 8 Apr 2008 02:19:55 -0400
In article <LrV54BLmIHA.1372@news-server>, bbeacham@beacham.no-
spam.co.uk says...
> tom gormley wrote:
> > I have assed source aliases in my project code to eliminate path
> > names and make the project more portable but i also need to the same
> > source aliases in some #include statement so that everything stays
> > consistent.
> 
> I assume you have a standard place where you do your work, a standard 
> working directory.
> 
> I suggest you create a subdirectory of your working directory, for each 
> of your source aliases and named after that source alias.    Then your 
> include statement would be a relative path and not dependent on any dBL 
> code:
> 
> #include ProjectConstants\Constants.h
> 
> 
> Bruce Beacham

Tom,

You can use Bruce's suggestion. Or, since constants change rarely, you 
can put the in the dBASE include folder:

C:\Program Files\dBASE\Plus\Include

-- 
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
about | contact