Hello

I added to the sources line a new module in a directory below it as:

sources = file1.cpp \
..\common\module2.cpp

But now when building, this occurs:
BUILD: Ignoring invalid directory prefix in SOURCES= entry:
..\common\module2.cpp

Then: "Don't know how to build ...."

How can I solve this?

--

Elias

Re: sources file and ..\pathto\module.cpp by Doron

Doron
Mon Mar 01 10:16:36 CST 2004

the sources file cannot reference source files that are in a parent or
sibling directory. you can't use dot relative paths (nor hardcoded ones if
i remember). if you want to do what you want do this

cmn\<sources here>
cmn\sources.inc <-- sources line looks line sources =..\file1.cpp
..\file2.cpp <etc> <etc>
cmn\dirs <--- this will list one and two
cmn\one\sources <--- one of the first lines will be !INCLUDE ..\sources.inc
cmn\two\sources <--- same as one\sources

OR, put all of the common code into a lib and link that lib against your
final binary.


d

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only.

"lallous" <lallous@lgwm.org> wrote in message
news:%23S7KaQ6$DHA.3804@TK2MSFTNGP09.phx.gbl...
> Hello
>
> I added to the sources line a new module in a directory below it as:
>
> sources = file1.cpp \
> ..\common\module2.cpp
>
> But now when building, this occurs:
> BUILD: Ignoring invalid directory prefix in SOURCES= entry:
> ..\common\module2.cpp
>
> Then: "Don't know how to build ...."
>
> How can I solve this?
>
> --
>
> Elias
>
>



Re: sources file and ..\pathto\module.cpp by anonymous

anonymous
Mon Mar 01 12:31:05 CST 2004

Or, create a file module2.cpp which is one line:
#include "..\common\module2.cpp"

Yes, it's a hack.

ScottR
--
Scott Robins


Re: sources file and ..\pathto\module.cpp by Igor

Igor
Mon Mar 01 16:56:18 CST 2004

"Doron Holan [MS]" <doronh@nospam.microsoft.com> wrote in message
news:eeAqTi6$DHA.3184@TK2MSFTNGP09.phx.gbl...
> the sources file cannot reference source files that are in a parent or
> sibling directory. you can't use dot relative paths (nor hardcoded ones
if
> i remember). if you want to do what you want do this

You can reference files in the parent directory, but not in a sibling.
..\file.c works, but
..\dir\file.c does not.




Re: sources file and ..\pathto\module.cpp by lallous

lallous
Fri Mar 05 05:24:35 CST 2004

That's is how I do it currently.

--
Elias
"Scott Robins" <anonymous@discussions.microsoft.com> wrote in message
news:5BD9669A-6BF9-408E-8103-C4A74DFC1ECE@microsoft.com...
> Or, create a file module2.cpp which is one line:
> #include "..\common\module2.cpp"
>
> Yes, it's a hack.
>
> ScottR
> --
> Scott Robins
>



Re: sources file and ..\pathto\module.cpp by Mark

Mark
Fri Mar 05 05:46:42 CST 2004

The software development configuration pattern of a common module location
is encapsulated into the form known as a 'programming library' and has been
for at least 30 years. There is no need to hack anything.


--

=====================
Mark Roddy
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com


"lallous" <lallous@lgwm.org> wrote in message
news:eJul8UqAEHA.4080@TK2MSFTNGP09.phx.gbl...
> That's is how I do it currently.
>
> --
> Elias
> "Scott Robins" <anonymous@discussions.microsoft.com> wrote in message
> news:5BD9669A-6BF9-408E-8103-C4A74DFC1ECE@microsoft.com...
> > Or, create a file module2.cpp which is one line:
> > #include "..\common\module2.cpp"
> >
> > Yes, it's a hack.
> >
> > ScottR
> > --
> > Scott Robins
> >
>
>