bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Shared Libraries: add ?sharedlibrary conditional

Open GWRon opened this issue 5 years ago • 0 comments

I just tried to wrap my DLL-source into a new file so I could use the functionality there without requiring a new file (yes, I could wrap the DLL functions around some core functions and use the core functions in my "new file" but this is not what I wanted to do ;-)).

So ... To use a file as "dll" we need to use InitBrl(). This is only defined when you compile a file as "shared library".

  • it is not defined in imported files (import "core.bmx" - core.bmx does not know about InitBrl())
  • there is no way to skip calling InitBrl() if the file does not know about the build target (there is "gui" and "console" handled for now)

So I ask for:

  • adding ?sharedlibrary next to ?console and ?gui
  • make InitBrl() callable from imported files too (if possible).
  • optionally: make InitBrl() a stub for non-shared libs? Dunno how this would affect precompilates (dll.bmx imports core.bmx. app.bmx imports core.bmx. core.bmx calls InitBrl()). maybe sharedlibraries need to have their own filename thing like console or gui.

GWRon avatar Aug 20 '19 08:08 GWRon