Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
How can I use some headers in gc.cpp. #27978
how can I use #include <dlfcn.h> in gc.cpp?
I would be really grateful if someone let me know.
We have explicitly disabled including any platform files from coreclr runtime and GC code. Only PAL and standalone GC's GCToOSInterface implemented in gcenv.unix.cpp can include such files.
I would suggest adding your functions that need to use stuff from the dlfcn.h to PAL, exposing the function prototypes in pal.h. Then you can call them from GC.
You could also do that in the gcenv.unix.cpp, however this code is used only for a standalone GC shared library that is not used by default (the default is to use the GC embedded into the libcoreclr.so) and it is also not as performant as the embedded GC.