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

Bug in win_2.05: -Rn and \"

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



Joined: 06 Mar 2005
Posts: 68

PostPosted: Tue May 03, 2005 5:47 am    Post subject: Bug in win_2.05: -Rn and \" Reply with quote

Consider this:

Code:
build main -Rn -test "-I..\imports" -XSDL -XOPENGL -XGLU
Command: 'C:\devel\D.tools\dmd\bin\dmd.exe "-op" "-ID:\project\DeeTest\imports\" "-IC:\devel\D.tools\dmd\bin\..\src\phobos" "prt\print.d" "main.d" "App.d" "main.def" "-ofmain.exe" '


This doesn't work in build_win_2.05 because of this param: "-ID:\project\DeeTest\imports\" where the last " is escaped and then the shell gives dmd it's parameters wrong.
Evidently this error only happens because of -Rn .
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
Derek Parnell



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

PostPosted: Tue May 03, 2005 6:04 am    Post subject: Re: Bug in win_2.05: -Rn and \" Reply with quote

phoenix wrote:
Consider this:

Code:
build main -Rn -test "-I..\imports" -XSDL -XOPENGL -XGLU
Command: 'C:\devel\D.tools\dmd\bin\dmd.exe "-op" "-ID:\project\DeeTest\imports\" "-IC:\devel\D.tools\dmd\bin\..\src\phobos" "prt\print.d" "main.d" "App.d" "main.def" "-ofmain.exe" '


This doesn't work in build_win_2.05 because of this param: "-ID:\project\DeeTest\imports\" where the last " is escaped and then the shell gives dmd it's parameters wrong.
Evidently this error only happens because of -Rn .


Thanks. I never realized that the shell escaped quotes like that. I guess I've never had to use them. Ok, the obvious workaround is to use a response file (-Ry) for now until I can get a fix out.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Tue May 03, 2005 7:23 am    Post subject: Reply with quote

While I'm at it, is it possible to specify the exetype (dos/console, windows/gui) without using a .def file (which is basicaly one more kind of response file Razz )?
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
Derek Parnell



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

PostPosted: Tue May 03, 2005 3:22 pm    Post subject: Reply with quote

phoenix wrote:
While I'm at it, is it possible to specify the exetype (dos/console, windows/gui) without using a .def file (which is basicaly one more kind of response file Razz )?

Yes.

To force a windows app, use the -gui switch. This is not needed if WinMain() is detected or a DLL is being created.

A console app is created if there is no WinMain detected and it is not a DLL being created.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Thu May 05, 2005 2:20 am    Post subject: Reply with quote

Derek Parnell wrote:
phoenix wrote:
While I'm at it, is it possible to specify the exetype (dos/console, windows/gui) without using a .def file (which is basicaly one more kind of response file Razz )?

Yes.

To force a windows app, use the -gui switch. This is not needed if WinMain() is detected or a DLL is being created.

A console app is created if there is no WinMain detected and it is not a DLL being created.

You didnt understand my question, Indeed it is ambigous. I was asking if it's possible for *build* (when using -Rn) to specify the exetype without using a .def file Razz
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
Derek Parnell



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

PostPosted: Thu May 05, 2005 5:46 am    Post subject: Reply with quote

phoenix wrote:
Is it possible for *build* (when using -Rn) to specify the exetype without using a .def file Razz

No. A .def file is always created and passed to the linker.

Why don't you want to use a .def file?
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
phoenix



Joined: 06 Mar 2005
Posts: 68

PostPosted: Thu May 05, 2005 10:40 am    Post subject: Reply with quote

Same reason I like -Rn, just to cut on the unnecessary stuff (temp files). It's just a small preference, but it's there Smile
_________________
Bruno Medeiros
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Thu May 05, 2005 1:30 pm    Post subject: Reply with quote

I think the -cleanup switch removes the .def file if its autogenerated? Could be wrong, though.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Derek Parnell



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

PostPosted: Thu May 05, 2005 3:26 pm    Post subject: Reply with quote

csauls wrote:
I think the -cleanup switch removes the .def file if its autogenerated? Could be wrong, though.

Yes, the -clean switch does remove temporary files that were created during the Building process.

The reason that the linker uses a Module Definition File is to reduce typing a long command line. Also, some command lines can get very long and there is an operating system limit to the command line length.

I think also, that some options can only be passed via the .DEF file, but I'm not too sure about that.


When I said No to the Exetype, a more correct answer is that you can pass this via the command line (-L/exet:dos) but a .DEF file is also used, so I don't know which takes precedence.

I'll add a new switch to Build so you can tell it to not create a .DEF file automatically. You will have to be responsible for providing one or an equivalent.
_________________
--
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