Does a static build ever need DllMain()?

Hello!

I recently upgraded my static SQLCipher library in windows project from an older version to 4.14.0 and promptly ran into a linker error due to DllMain() already being defined in MSVCRT.lib. After some digging, I discovered the SQLCIPHER_OMIT_DLLMAIN flag and with that everything works fine.

My question is, shouldn’t SQLCIPHER_OMIT_DLLMAIN always be defined for static builds, or is there a situation where one would need to have this method in the static library? And if it isn’t needed, wouldn’t it make sense to have the flag be set automatically by the build system?

Hello @nbeck - thanks for the feedback here. I noticed you cross posted this to GitHub earlier this week, but we’ve heads down on a release and didn’t have a chance to reply. I’ve just posted a reply there, since that was the original repprt and it is code focused.

Thank you for the quick response! And sorry for cross posting. I was afraid that maybe the GitHub issues weren’t watched as closely. But I probably should have linked the issue here.