FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

path problem

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
luismarques



Joined: 25 Dec 2006
Posts: 5

PostPosted: Mon Dec 25, 2006 10:38 am    Post subject: path problem Reply with quote

Hello,

I have a directory structure somewhat like this

Code:

<dir> build
<dir> doc
<dir> src
    <dir> foo
        main.d
        config.d
bud.exe


The following does not work:

Code:

>bud -odbuild -Tlua src\foo\main.d
src\foo\main.d(3): module config cannot read file 'foo\config.d'


But the following works:

Code:

src> ..\bud -od..\build -T..\foo foo\main.d


Perhaps the first case should be tweaked to work? It seems like a bug to me.

Also, I think I should point out: initially I had a batch file that called dmd.exe with the full path, instead of having dmd in the PATH. When I tried bud, it spew "unable to find 'sc.ini'". So I skimmed the docs looking how to configure a sc.ini file. Eventually (by hunch) I fixed the issue by putting dmd.exe in the PATH. Perhaps that message could changed to something like "cannot find compiler 'dmd.exe' in path nor configuration file 'sc.ini'"?

Best regards, keep it up!
Back to top
View user's profile Send private message Send e-mail
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Mon Dec 25, 2006 1:02 pm    Post subject: Reply with quote

You need to include -Isrc to your command line.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
luismarques



Joined: 25 Dec 2006
Posts: 5

PostPosted: Mon Dec 25, 2006 2:06 pm    Post subject: Reply with quote

Carlos wrote:
You need to include -Isrc to your command line.


Thank you, Carlos.

Still, in my view, bud should be able to deduce the correct path without further command line options. Is there really a reason against that?

Best regards and happy xmas.
Back to top
View user's profile Send private message Send e-mail
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Mon Dec 25, 2006 7:25 pm    Post subject: Re: path problem Reply with quote

luismarques wrote:
Hello,

I have a directory structure somewhat like this

Code:

<dir> build
<dir> doc
<dir> src
    <dir> foo
        main.d
        config.d
bud.exe


The following does not work:

Code:

>bud -odbuild -Tlua src\foo\main.d
src\foo\main.d(3): module config cannot read file 'foo\config.d'


But the following works:

Code:

src> ..\bud -od..\build -T..\foo foo\main.d


Perhaps the first case should be tweaked to work? It seems like a bug to me.

Well I dispute the bug claim Wink as it was never specified to do that so its not failing to meet specifications (i.e. a Bug). The problem is with DMD as imports are never relative to the file doing the importing; they are only relative to entries in the Import Path list (-I). However, I think you are asking for Bud to automatically add certain entries to the import list.

For example, if the command says "src\foo\main.d" then Bud should add "<PWD>\src" and "<PWD>\src\foo" to the Import Path list. (Where <PWD> refers to the current working directory.

Note that Bud already does something like this. If an import statement is "import abc\def\ghi;" then Bud adds "<PWD>\abc" and "<PWD>\abc\def" to the import path list.

I think that this is a good idea so I'll add it to the tool.

luismarques wrote:
Also, I think I should point out: initially I had a batch file that called dmd.exe with the full path, instead of having dmd in the PATH. When I tried bud, it spew "unable to find 'sc.ini'". So I skimmed the docs looking how to configure a sc.ini file. Eventually (by hunch) I fixed the issue by putting dmd.exe in the PATH. Perhaps that message could changed to something like "cannot find compiler 'dmd.exe' in path nor configuration file 'sc.ini'"?

Bud actually does check that the compiler exists, however it does that after scanning for the sc.ini file. So I should probably swap the order of scanning. First scan for the compiler then scan for sc.ini.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build All times are GMT - 6 Hours
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, 2005 phpBB Group