-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Disable export of NimMain and NimDestroyGlobals #24471
Comments
Consider doc:
|
And IIRC, NimDestoryGlobals is currently not documented. So rename NimMain via |
|
ringabout
added a commit
that referenced
this issue
Dec 3, 2024
ref #24471 --------- Co-authored-by: metagn <metagngn@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
For dynamic library projects, Nim enforces the export of the NimMain and NimDestroyGlobals functions. In my project, the exported functions have a unified naming convention and include their own initialization and unloading functions (MyInit, MyUninit). I would prefer to initialize within my own exported functions, but Nim does not provide me with this opportunity. Therefore, I have no choice but to proceed in the following way:
Of course, I have seen such declarations in the community:
However, it doesn't work in Nim 2.2.0. The generated C code doesn't have a forward declaration for NimMain.
Description
Give the choice of exports to the developers, and provide the opportunity to directly call NimMain and NimDestroyGlobals in the Nim code.
Alternatives
No response
Examples
No response
Backwards Compatibility
No response
Links
No response
The text was updated successfully, but these errors were encountered: