Most of the work so far has been porting between C/C++ compilers, but one of the other things I'm doing is adding diagnostic logging, via Pantheios of course.
As it's been several months since I've plugged Pantheios into a DLL I've forgotten the significant issues:
- (By default) the Pantheios core is not initialised explicitly, meaning that DllMain() must call the functions pantheios_init() (if C) or pantheios::init() (if C++) to initialise the library (or handle the error and fail DllMain(), if it fails), and call pantheios_uninit() (if C) or pantheios::uninit() (if C++) to uninitialise (but only if the initialisation failed). (See instructions below for implicit initialisation in a DLL.)
- Global object constructors must not invoke logging facilities
- specify the pre-processor flag PANTHEIOS_FORCE_AUTO_INIT in your DLL's compilation
- have at least one C++ source file the DLL project includes pantheios/pantheios.hpp
A few days ago after reinstalling the OS on my computer, there was a DLL error. For a long time I could not find a solution to this problem. And after my long search I realized that I needed msvcp140.dll download https://fix4dll.com/msvcp140_dll. After that, my problem was solved.
ReplyDelete