[Issue 5815] Using -O is causing wrong code to be generated for extern(C) method call.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 9 10:31:24 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5815
opantm+spam at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #6 from opantm+spam at gmail.com 2011-04-09 10:27:41 PDT ---
(In reply to comment #4)
> If you look it up in shlwapi.h in the SDK, it is declared as
>
> LWSTDAPI_(BOOL) PathRemoveFileSpecA(__inout LPSTR pszPath);
>
> and LWSTDAPI_(BOOL) expands to 'extern "C" __declspec(dllimport) BOOL
> __stdcall'.
> __stdcall translates to D as extern(Windows).
>
> I have tried your code, and I get a link error with "extern(C)". I have used
> coff2implib to convert the library from the sdk, because I have had problems
> with implib on DLLs in the past, it especially misses a number of symbols.
>
> With "extern(Windows)", I can link and run your code without problems.
Awesome. After getting coffimplib and converting with it instead as well as
changing to extern(Windows), it works both with and without -O. :) Thanks for
the help. I guess this bug report is invalid.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list