* Different working folder for a C/C++ source file
@ 2008-08-19 20:45 Seyran Avanesyan
2008-08-19 22:05 ` Eljay Love-Jensen
0 siblings, 1 reply; 3+ messages in thread
From: Seyran Avanesyan @ 2008-08-19 20:45 UTC (permalink / raw)
To: gcc-help
Hi,
Can I compile a C/C++ source from folder /AAA, but tell gcc to pretend
that the file is in the folder /BBB.
The problem is /BBB contains all the necessary files (source and include
files), but I took one of them, modified a little, and /BBB is
read-only.
Thanks,
Seyran
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Different working folder for a C/C++ source file
2008-08-19 20:45 Different working folder for a C/C++ source file Seyran Avanesyan
@ 2008-08-19 22:05 ` Eljay Love-Jensen
2008-08-20 8:36 ` Seyran Avanesyan
0 siblings, 1 reply; 3+ messages in thread
From: Eljay Love-Jensen @ 2008-08-19 22:05 UTC (permalink / raw)
To: Seyran Avanesyan, GCC-help
Hi Seyran,
Try this:
cd /AAA
for FILE in /BBB/*
do
if test ! -e $FILE
ln -s $FILE
fi
done
g++ -c -o real.o real.cpp
HTH,
--Eljay
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Different working folder for a C/C++ source file
2008-08-19 22:05 ` Eljay Love-Jensen
@ 2008-08-20 8:36 ` Seyran Avanesyan
0 siblings, 0 replies; 3+ messages in thread
From: Seyran Avanesyan @ 2008-08-20 8:36 UTC (permalink / raw)
To: Eljay Love-Jensen, GCC-help
Thanks, that's a nice solution, but unfortunately I forgot to mention
that I'm compiling under Windows Vista 64-bit.
I've got another solution by using '#line' preprocessor directive to
correct paths in error messages.
And using additional `-I' switch on the command line for /BBB folder.
But I was thinking about some kind of command line switch to do that at
once.
-----Original Message-----
From: Eljay Love-Jensen [mailto:eljay@adobe.com]
Sent: Tuesday, August 19, 2008 1:45 PM
To: Seyran Avanesyan; GCC-help
Subject: Re: Different working folder for a C/C++ source file
Hi Seyran,
Try this:
cd /AAA
for FILE in /BBB/*
do
if test ! -e $FILE
ln -s $FILE
fi
done
g++ -c -o real.o real.cpp
HTH,
--Eljay
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-20 4:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-19 20:45 Different working folder for a C/C++ source file Seyran Avanesyan
2008-08-19 22:05 ` Eljay Love-Jensen
2008-08-20 8:36 ` Seyran Avanesyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).