سؤال

I would like to check if I have openssl installed using C/C++ code. Is it even possible? I mean, is there a macro, or something which will be a portable way of doing this? Thanks

هل كانت مفيدة؟

المحلول

The following will work on Windows and Linux:

#ifdef WIN32
libHandle = LoadLibrary( libraryName );
#else
libHandle = dlopen( libraryName, RTLD_LOCAL | RTLD_NOW );
#endif
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top