www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7186] New: Only the first exported extern(C) function has underscore prefix

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

           Summary: Only the first exported extern(C) function has
                    underscore prefix
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



17:04:13 PST ---
See attachment. When the DLL is built the exported symbols are:

_foo1
foo2
foo3

AFAIK on Windows all exported C functions have an underscore prefix.

You can use DLL Export Viewer to see the symbols:
http://www.nirsoft.net/utils/dllexp.zip

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7186




17:04:44 PST ---
Created an attachment (id=1063)
DLLExportBug

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 30 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7186


Rainer Schuetze <r.sagitario gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |r.sagitario gmx.de
         Resolution|                            |DUPLICATE



PST ---
issue 3956 has slightly more info, so I'm closing this one as a duplicate

*** This issue has been marked as a duplicate of issue 3956 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 31 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7186




PST ---
Forgot to mention the workaround: list the symbols to export in the linker
definition file.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 31 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7186




08:53:49 PST ---
Thanks for the workaround. I find it amusing that we've used the exact same
function names in the sample, lol. :p

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 31 2011