Fixed ole32.dll pragrma for cross-compilation (#650)

* Fixed ole32.dll pragrma for cross-compilation

Pragma specified Ole32.dll, which broke compilation on case-sensitive file
systems, ie. when cross-compiling with ldc on Linux.

* Replaced pragma with dub directive

Deleted pragma(lib) and moved ole32 to libs-windows in dub.json
This commit is contained in:
drahosj 2023-01-27 09:33:08 -06:00 committed by GitHub
parent 9e288ffd57
commit 51d1eabb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -19,6 +19,8 @@
"libs-linux": ["z"], "libs-linux": ["z"],
"libs-windows": ["ole32"],
"stringImportPaths": [ "stringImportPaths": [
"views" "views"
], ],

View File

@ -366,8 +366,6 @@ private:
import core.sys.windows.objbase; import core.sys.windows.objbase;
import core.sys.windows.objidl; import core.sys.windows.objidl;
pragma(lib, "Ole32");
alias GUID KNOWNFOLDERID; alias GUID KNOWNFOLDERID;
extern(Windows) @nogc @system HRESULT _dummy_SHGetKnownFolderPath(const(KNOWNFOLDERID)* rfid, DWORD dwFlags, HANDLE hToken, wchar** ppszPath) nothrow; extern(Windows) @nogc @system HRESULT _dummy_SHGetKnownFolderPath(const(KNOWNFOLDERID)* rfid, DWORD dwFlags, HANDLE hToken, wchar** ppszPath) nothrow;