Author Topic: avoid copy/past of dll's in program directory  (Read 5113 times)

Offline zayl

  • Single posting newcomer
  • *
  • Posts: 3
avoid copy/past of dll's in program directory
« 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 ?
« Last Edit: August 07, 2012, 12:56:19 pm by zayl »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: avoid copy/past of dll's in program directory
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline zayl

  • Single posting newcomer
  • *
  • Posts: 3
Re: avoid copy/past of dll's in program directory
« Reply #2 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: avoid copy/past of dll's in program directory
« Reply #3 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ