Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: zayl on August 07, 2012, 12:54:16 pm

Title: avoid copy/past of dll's in program directory
Post by: zayl on August 07, 2012, 12:54:16 pm
Hello
My c++ program uses openssl like :
#include <openssl/ssl.h>

I have linked the lib, bin, and lib folders of openssl with my codeblocks project and it compile well. The problem is when I try to run the program, a popup window open and tell me that ssleay32.dll and libeay32.dll are required. I know that it can be solved by copy/past the those two files from bin directory of openssl but I am asking why the program didn't include those dll into its core ? I want my program to be independent from those dll's once it is buit. So did I miss something to configure in c::b for that to work properly ?
Title: Re: avoid copy/past of dll's in program directory
Post by: MortenMacFly on August 07, 2012, 05:10:41 pm
So did I miss something to configure in c::b for that to work properly ?
Use static libs and static linking (if possible with SSL). This is not related to Code::Blocks btw, you should better ask in the OpenSSL forum.
Title: Re: avoid copy/past of dll's in program directory
Post by: zayl on August 08, 2012, 03:55:06 am
Thank you for your response, In Build Options -> Linker Settings I added the path to ssleay32.lib and libeay32.lib but still require the two dll's above. Maybe I should convert them into lib files using tools that to that and link them again and see what will happen.
Title: Re: avoid copy/past of dll's in program directory
Post by: MortenMacFly on August 08, 2012, 06:24:56 am
Thank you for your response, In Build Options -> Linker Settings I added the path to ssleay32.lib and libeay32.lib but still require the two dll's above. Maybe I should convert them into lib files using tools that to that and link them again and see what will happen.
Look, you are missing some basic understanding. If you link against libraries (*.lib) this doesn't mean they are static and you don't need DLL's. If these are import libraries, you'll need the DLL's as they provide the functions. Please read yourself into this topic. Then (I repeat myself) ask in the appropriate forum for the static libraries - we don't provide support for OpenSSL.

This is a Code::Blocks forum, not a general programming nor an OpenSSL / Whats-O-Ever-Lib support forum.

Topic locked.