View previous topic :: View next topic |
Author |
Message |
regan
Joined: 21 Jun 2004 Posts: 23
|
Posted: Tue Sep 14, 2004 10:57 pm Post subject: compile mango.lib on windows |
|
|
Hi,
I am trying to compile mango.lib on windows, I tried this:
Code: |
D:\D\src\mango>d:\d\dm\bin\make -f win32.make lib
d:\d\dm\bin\lib -c -n -p256 obj/mango.lib @obj/mango.rsp
Digital Mars Librarian Version 8.00n
Copyright (C) Digital Mars 2000-2002 All Rights Reserved www.digitalmars.com
Error: cannot open response file
--- errorlevel 1
|
as you can see, no dice.. where does the mango.rsp file come from?
it's not in the SVN (as the obj dir is not either)
I do have an obj dir, I can compile mango like this:
Code: |
D:\D\src\mango>d:\d\dm\bin\make -f win32.make
|
it creates all the .obj files and mango.exe in the obj dir (I think I had to create the obj dir myself)
Regan |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Wed Sep 15, 2004 8:43 am Post subject: There is hope! |
|
|
I came across this problem a while back, but honestly thought I had merely downloaded a dirty or not-quite-ready version of mango from /trunk. I should have posted this workaround earlier.
The .rsp file is a response-file that the digitalmars tools are sensitive to. Anything following the '@' character on the dmd command line is seen as a file that contains the rest of the command line. Its very useful for side-stepping the limited environment space in window's command-prompt, among other things.
In mango's case, this is supposed to be the list of files created in the $(OBJ) directory which happen to all be .obj files. However, I think Kris left out the step that creates the .rsp in the makefile.
I have cygwin installed on my windows box, so I inserted a line like this into the makefile:
+ls $(OBJ) > mango.rsp
... which basically pipes the entire list .obj files into the response file after dmd compiles the $(SRC) target files. The '+' prefix tells DM's make tool to execute the command in its own environment which (for reasons unknown) is the only way to get certain commands to work.
I've tried the same with "dir /b" but dir insists on putting carriage returns everywhere, thus ruining the response file.
As a work-around, you could code a small util (probably 20 lines of D at the most) that does the job of creating a proper repsonse file. Also, you could create a listing of obj files similar to the $(SRC) collection of d files in the makefile itself, but I see that as being a lot more work and would be a pain to recreate once mango is updated with any new files. _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
regan
Joined: 21 Jun 2004 Posts: 23
|
Posted: Mon Sep 20, 2004 4:38 pm Post subject: Re: There is hope! |
|
|
pragma wrote: |
I've tried the same with "dir /b" but dir insists on putting carriage returns everywhere, thus ruining the response file.
|
It seems to work fine for me
eg.
dir /b /s obj\*.obj > obj\mango.rsp
Ideally this would work:
dir /b /s $(OBJ)*.obj > obj\mango.rsp
but for some reason dir insists on treating "$(OBJ)*.obj" AKA "obj/*.obj" as a command line switch. |
|
Back to top |
|
|
|
|
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
|