C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

embedded directory paths

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
David
Guest





PostPosted: Fri Oct 29, 2004 4:51 pm    Post subject: embedded directory paths Reply with quote



I have an #include file (A) that calls another #include file (B) -
including the directory path that it is to be found on.

The files live in a unix system - people compile using a samba share,
so that the files appear to be on a locally attached PC drive.
However, when we have problems with samba (as we do from time to time)
they need to access these include files via a network link.

So, the path to #include B is coded something like #include
"S:/test/includeb" and this no longer works when accessed via a
network link as the S: drive is no longer available. Via the network
link the path would be something like \fstest1testincludeb

How can I change the call to include B so that it works in both cases?
Back to top
Victor Bazarov
Guest





PostPosted: Fri Oct 29, 2004 4:59 pm    Post subject: Re: embedded directory paths Reply with quote



David wrote:
Quote:
I have an #include file (A) that calls another #include file (B) -
including the directory path that it is to be found on.

The files live in a unix system - people compile using a samba share,
so that the files appear to be on a locally attached PC drive.
However, when we have problems with samba (as we do from time to time)
they need to access these include files via a network link.

So, the path to #include B is coded something like #include
"S:/test/includeb" and this no longer works when accessed via a
network link as the S: drive is no longer available. Via the network
link the path would be something like \fstest1testincludeb

How can I change the call to include B so that it works in both cases?

This is off-topic. Please in the future consider asking in the newsgroup
dedicated to your compiler.

<offtopic>
You need to figure out the common part (seems like "includeb" is it)
and keep it:

#include <includeb>

And you need to give the compiler a hint where to find that file
(-I compiler switch, e.g.). So, when Samba works, you need to say

cl -I"S:test" ...

and when it doesn't you say

cl -I"\fstest1test"

Of course, it's better done using a make file or a project file that sets
some kind of environment variable...
</offtopic>

V

Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.