I want to compile moongose with static library of libssl . I have given .a file with -L option. But still it is loading .so file. why ? how can I force it to use static lib ?
Asked
Active
Viewed 963 times
0
-
Is the *.a really the static library and not the import library? – Simon Aug 22 '11 at 13:43
-
see http://code.google.com/p/mongoose/source/browse/mongoose.c line no 3562 . – Vivek Goel Aug 22 '11 at 13:44
1 Answers
0
Run compilation under strace
, to look where .a file is being searched and why .so is loaded instead.
EDIT
By default moongose loads SSL dynamically. To change this compile it with NO_SSL_DL
macro. Add -DNO_SSL_DL
to compilation command line. See this link.

ks1322
- 33,961
- 14
- 109
- 164
-
please check code see code.google.com/p/mongoose/source/browse/mongoose.c line no 3562 they are calling load_dll – Vivek Goel Aug 22 '11 at 14:44
-
Yes, it looks like you need to recompile moongose with NO_SSL_DL macro. See [this](http://code.google.com/p/mongoose/issues/detail?id=171#c7) – ks1322 Aug 22 '11 at 14:55
-
I want ssl support . but I don't want to use dynamic lib, I want to use static lib. – Vivek Goel Aug 22 '11 at 17:39
-
OK, link statically as you did and also compile with `NO_SSL_DL` macro. Than you shold have ssl support statically - I have not tested it. Also note that you should give .a file with `-l` option - [man gcc](http://linux.die.net/man/1/gcc). – ks1322 Aug 22 '11 at 18:33