www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1859] New: The librarian (lib.exe) confused by dashes in object names

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1859

           Summary: The librarian (lib.exe) confused by dashes in object
                    names
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: torhu yahoo.com


I'm not sure if this is the correct place for reporting this, but it's I across
it because of rebuild's use of dashes in object file names.

Doing the following will cause lib to go into interactive mode instead of
adding b-c.obj to the library:

---
c:\prog\test\lib>lib -c test.lib a.obj
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html
Digital Mars Librarian complete.

c:\prog\test\lib>lib test.lib b-c.obj
Digital Mars Librarian Version 8.02n
Copyright (C) Digital Mars 2000-2007 All Rights Reserved
http://www.digitalmars.com/ctg/lib.html
list file           (.lst)
c:\prog\test\lib>oops...
---

Adding an option, like -p512 when adding b-c.obj fixes the problem.  Putting
quotes around the file name doesn't help.


-- 
Feb 21 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1859


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID





This is how lib is designed to work. See
http://www.digitalmars.com/ctg/lib.html

Always put the switches first, or you'll be using the "obsolete" syntax.


-- 
Feb 22 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1859


torhu yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |





The problem is that this:

lib test.lib b-c.obj

When there are no switches, the docs say that the object files will be added to
the library.  But object file names with dashes in them confuse lib, so with
the above command line, it enters interactive mode instead.


-- 
Feb 22 2008
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1859


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX





That's because it matches the syntax used by the obsolete syntax. There's
nothing to be done about that, except don't put - in your object files. Use an
_ instead.


-- 
Feb 22 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1859






-------
How about an option ("--" is the one commonly used) which specifies that all
the following arguments are not switches? As a (somewhat useless) bonus, this
also allows for files with the same names as switches.


-- 
Feb 22 2008