bflattened / bflat

C# as you know it but with Go-inspired tooling (small, selfcontained, and native executables)
GNU Affero General Public License v3.0
3.63k stars 104 forks source link

What does --target Shared mean? a dotnet dll? or a plain .dll? or .so? #86

Closed xiaoyuvax closed 1 year ago

xiaoyuvax commented 1 year ago

what's the differences between Exe, WinExe and Shared? not seen in document.

I would like to build an Winform referencing several other lib projects which output DLLs, i want to Bflat them all, how can i do it. It seems Compile referenced lib projects to Shared doesn't work.

MichalStrehovsky commented 1 year ago

If you have an assembly, pass it to bflat build using -r.

Target shared means build a native shared library. .so on Linux, .dll on Windows. You would build a shared library if you want to consume it from a different non-dotnet programming language. Doesn't sound like your case.

xiaoyuvax commented 1 year ago

got it, Shared seems not my case.

so what about my case? how to build referenced lib projects from source code into one native exe with bflat? or can bflat compile an assembly as .dll lib (to native code) which can be served in -r arg? or the -r arg can only refer to IL assembly ??!

would bflat build-il produce IL assembly which can be referenced by -r ?

does it mean, anyway, i can't build a native .dll assembly which can be "-r" referenced by a bflat built native executable?

xiaoyuvax commented 1 year ago

How bflat built Shared library be used by other language? I used some Exports viewer to scan bflat generated .dll file, and can't find any exported functions or so. @MichalStrehovsky