View previous topic :: View next topic |
Author |
Message |
phoenix
Joined: 06 Mar 2005 Posts: 68
|
Posted: Tue May 03, 2005 5:47 am Post subject: Bug in win_2.05: -Rn and \" |
|
|
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 |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue May 03, 2005 6:04 am Post subject: Re: Bug in win_2.05: -Rn and \" |
|
|
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 |
|
|
phoenix
Joined: 06 Mar 2005 Posts: 68
|
Posted: Tue May 03, 2005 7:23 am Post subject: |
|
|
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 )? _________________ Bruno Medeiros |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Tue May 03, 2005 3:22 pm Post subject: |
|
|
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 )? |
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 |
|
|
phoenix
Joined: 06 Mar 2005 Posts: 68
|
Posted: Thu May 05, 2005 2:20 am Post subject: |
|
|
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 )? |
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 _________________ Bruno Medeiros |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Thu May 05, 2005 5:46 am Post subject: |
|
|
phoenix wrote: | Is it possible for *build* (when using -Rn) to specify the exetype without using a .def file |
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 |
|
|
phoenix
Joined: 06 Mar 2005 Posts: 68
|
Posted: Thu May 05, 2005 10:40 am Post subject: |
|
|
Same reason I like -Rn, just to cut on the unnecessary stuff (temp files). It's just a small preference, but it's there _________________ Bruno Medeiros |
|
Back to top |
|
|
csauls
Joined: 27 Mar 2004 Posts: 278
|
Posted: Thu May 05, 2005 1:30 pm Post subject: |
|
|
I think the -cleanup switch removes the .def file if its autogenerated? Could be wrong, though. _________________ Chris Nicholson-Sauls |
|
Back to top |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Thu May 05, 2005 3:26 pm Post subject: |
|
|
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 |
|
|
|