webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
https://webui.me
MIT License
2.96k stars 172 forks source link

Can I compile a 32-bit dll? #286

Closed dqi1999 closed 4 months ago

dqi1999 commented 9 months ago

Can I compile a 32-bit dll?

jinzhongjia commented 9 months ago

of course, I don't know how to that with gcc,but you can use this command zig build -Dtarget=x86-linux -Dis_static=false -Denable_tls=false to build dynamic library for x86(32bits) windows (if you want to enable tls support, use -Denable_tls=true)

jinzhongjia commented 9 months ago

After running zig build -Dtarget=x86-linux -Dis_static=false -Denable_tls=false, you can find the dynamic library in the directory zig-out/lib

dqi1999 commented 9 months ago

thank you!But I do not use zig to compile, testing for half a day did not get the dynamic link library, you can also release a 32-bit dynamic link library when you publish?

jinzhongjia commented 9 months ago

Sorry, I am not responsible for the webui of the C library. Need to ask @hassandraga @ttytm about this.

dqi1999 commented 9 months ago

Thank you!

AlbertShown commented 9 months ago

Which OS and compiler you are using? I guess you can simply run make using your 32bit compiler and will work fine!

dqi1999 commented 9 months ago

zig compiled successfully using the latest version of webui;use cmd: zig build -Dtarget=x86-linux -Dis_static=false -Denable_tls=false,But the output is a file libwebui.so;I want to get the .dll file, use cmd:zig build -Dtarget=x86-windows-gnu -Dis_static=false -Denable_tls=false; but there is a compilation error! image

jinzhongjia commented 9 months ago

Yes, it seems that there are some strange problems with dynamic link building windows, I fixed them normally

jinzhongjia commented 9 months ago

this pr should fix this problem:https://github.com/webui-dev/webui/pull/289