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
Using CreateGlueToC without a shell #158
Comments
Good question. I think the CreateGlueToC() function is only needed when compiling the initial custom C code. The second compilation of the pForth kernel should be able to use PF_NO_SHELL and then run the turnkey dictionary. |
OK. I had not realized that the C functions were described by the dictionary. My original idea was to use pforth embedded in a program where extra C functions are not actually known at compile time. A series of plugins would be dlopen'ed/LoadLibrary'ed, and then a list of functions would be enumerated and added at program start. Does this mean that situation require the dictionary to be recreated whenever the set of plugins changed? |
You could use the custom C functions to call dlopen, dlsym, etc.
You could define an AUTO.INIT function that called the plugin loader. |
I'm trying to understand why using CreateGlueToC requires a shell (as it's behind a
#if (!defined(PF_NO_INIT)) && (!defined(PF_NO_SHELL))
). This seems like a fully embedded usage couldn't also have exposed C/C++ functions. Is there a reason this is the case?The text was updated successfully, but these errors were encountered: