http://d.puremagic.com/issues/show_bug.cgi?id=2776

           Summary: pragma(lib, does not work when used in headers
           Product: D
           Version: 1.041
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: ben...@tionex.de


I tried to use the pragma(lib, ...) feature without success.

I build a lib called "org.eclipse.swt.win32.win32.x86.lib", the source contain
several pragma declarations:

pragma(lib, "comctl32.lib"); // and more win32 libs
pragma(lib, "org.eclipse.swt.win32.win32.x86.lib"); // link to the lib itself

The module with those pragmas is always imported if the lib is used.

Now, when i compile a example using the lib and turn on verbose, dmd prints all
those lib lines
...
library   comctl32.lib
library   org.eclipse.swt.win32.win32.x86.lib
...

Later it prints the commands it passes to "link.exe", here the libs are
missing:
c:\Project\dwtinst\tango-0.99.8-bin-win32-dmd.1.041\bin\link.exe
"C:\Project\dwtinst\dwt-rcp\obj\SwtSnippet10","C:\Project\dwtinst\dwt-rcp\bin\SwtSnippet10.exe",,user32+kernel32/noi+C:\Project\dwtinst\dwt-rcp\lib\+tango-user-dmd.lib;

The result are all those symbols are missing.


-- 

Reply via email to