 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
David Guest
|
Posted: Fri Oct 29, 2004 4:51 pm Post subject: embedded directory paths |
|
|
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
|
Posted: Fri Oct 29, 2004 4:59 pm Post subject: Re: embedded directory paths |
|
|
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 |
|
 |
|
|
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
|
|