www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - library pragma doesn't like extra periods

I found a problem where D gets confused by
  pragma(lib, "recls.D.lib");
  pragma(lib, "recls.dm.lib");

Somehow, it loses the ".lib" at the end.

Here's my code:

import std.stdio;
import std.recls;

     pragma(lib, "recls.D.lib");
     pragma(lib, "recls.dm.lib");
     pragma(lib, "recls_D.lib");
     pragma(lib, "recls_dm.lib");

pragma(lib, "wininet.lib");

void main()
     FtpSearch f;

If I compile it using the original names[version(origNames)], it can't 
find the files:

I:\pgm\d\examples\recls>dmd ftpsearch.d -version=origNames
d:\dmd\bin\..\..\dm\bin\link.exe ftpsearch,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

  Warning 2: File Not Found recls.D
  Warning 2: File Not Found recls.dm

If I compile with new names (replacing the first period with an 
underscore and not setting a version), it works fine.

So I've found two work-arounds to this issue.
1) Rename the libs to only have one period.
2) Add the .lib's to the command line rather than through pragmas.

(By the way, I'm using the recls libs and source from 
http://recls.org/downloads.html and the wininet.lib from 

I'm using DMD v0.121 on Windows XP.

Apr 17 2005