Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dub support #12

Merged
merged 13 commits into from
Feb 1, 2024
Merged

add Dub support #12

merged 13 commits into from
Feb 1, 2024

Conversation

kassane
Copy link
Owner

@kassane kassane commented Jan 28, 2024

@kassane
Copy link
Owner Author

kassane commented Jan 28, 2024

dub not linking dll libraries, only *.lib|**.a? (zig build -DShared - build sokol.dll)
see: https://github.com/kassane/sokol-d/actions/runs/7686938821/job/20946392177?pr=12#step:6:40

CI - Windows error:

dub build :clear
    Starting Performing "debug" build using C:\hostedtoolcache\windows\dc\ldc2-cbdce51f\x64\ldc2-cbdce51f-windows-multilib\bin\ldc2.exe for x86_64.
    Building sokol-d:clear 0.1.0: building configuration [application]
   Pre-build Running commands
Error: unrecognized file extension dll
Error: unrecognized file extension dll
Error: unrecognized file extension dll
Error: unrecognized file extension dll

I need help, about Windows linking using (re)dub. Because zig provides own linker in all targets, but dub (pkg-manager) not.

cc: @MrcSnm, @ryuukk


Edit

The bug isn't in the dub, maybe in the zig. I need on windows to check and fix this.

@kassane
Copy link
Owner Author

kassane commented Jan 28, 2024

The bug isn't in the dub, maybe in the zig. I need on windows to check and fix this.

Yes and no!
zig build -Dshared also run ldc2 building all examples, no library only. This error is issued by ldc2 which does not recognize dll extension. However, the zig generated without any problem.

@kassane kassane added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed and removed bug Something isn't working labels Jan 28, 2024
@kassane
Copy link
Owner Author

kassane commented Jan 28, 2024

Note: Needed to switch setup-zig because caching was missing, was making the zig installation longer.

-     - uses: goto-bus-stop/setup-zig@v2
+     - uses: korandoru/setup-zig@v1
+       with:
+         zig-version: master

@kassane
Copy link
Owner Author

kassane commented Jan 28, 2024

Latest commit, get another errors using implib (sokol.lib defined from dll).

https://github.com/kassane/sokol-d/actions/runs/7688266248/job/20949282160#step:6:1

ldc/ldmd2, Windows support is 😖🔫!!


Edit

Maybe, I need to port all libsokol dependencies listed in build.zig to dub.sdl when getting the static library. Possibly identifying all reference links.

@kassane kassane mentioned this pull request Jan 29, 2024
@kassane kassane merged commit 8c95c1e into main Feb 1, 2024
3 checks passed
@kassane kassane deleted the dub-support branch February 1, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dub support
1 participant