<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoPlainText>[snip]<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>> ><o:p></o:p></p>
<p class=MsoPlainText>> > When I try to link dynlib.dll into the
executable, it complains about <o:p></o:p></p>
<p class=MsoPlainText>> > a whole load of unresolved external symbols. I
recognize them; they're <o:p></o:p></p>
<p class=MsoPlainText>> > openssl symbols, and the problem goes away and
links and runs just <o:p></o:p></p>
<p class=MsoPlainText>> > fine if I add libeay32.lib and ssleay32.lib as
dependencies of the <o:p></o:p></p>
<p class=MsoPlainText>> > executable.<o:p></o:p></p>
<p class=MsoPlainText>><o:p> </o:p></p>
<p class=MsoPlainText>> Please post the output you get, in particular its
interesting wether the undefined symbols are missing in code thats part of the
executable or part of the library.<o:p></o:p></p>
<p class=MsoPlainText>><o:p> </o:p></p>
<p class=MsoPlainText>> Also I suggest to run nmake VERBOSE=1 (if you're
using nmake generator) to see the actual compiler calls that cmake uses to
compile the library and the executable and check wether the ssl-libs are really
put into the library or not.<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Using Visual Studio 2005 as the generator on Windows.
Output below:<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>1>------ Rebuild All started: Project: testproject,
Configuration: Debug Win32 ------<o:p></o:p></p>
<p class=MsoPlainText>1>Deleting intermediate and output files for project
'testproject', configuration 'Debug|Win32'<o:p></o:p></p>
<p class=MsoPlainText>1>Compiling...<o:p></o:p></p>
<p class=MsoPlainText>// This is my source file that uses the dynamic library<o:p></o:p></p>
<p class=MsoPlainText>1>lrfcbelowlimit.c <o:p></o:p></p>
<p class=MsoPlainText>1>Linking...<o:p></o:p></p>
<p class=MsoPlainText>// vibe.lib is the corresponding export library for
dynlib.dll<o:p></o:p></p>
<p class=MsoPlainText>1>vibe.lib(encodeschema.obj) : error LNK2001:
unresolved external symbol _ASN1_OCTET_STRING_it<o:p></o:p></p>
<p class=MsoPlainText>1>vibe.lib(recipinfo.obj) : error LNK2001: unresolved
external symbol _ASN1_INTEGER_it<o:p></o:p></p>
<p class=MsoPlainText>1>vibe.lib(appidencode.obj) : error LNK2001:
unresolved external symbol _ASN1_GENERALIZEDTIME_it<o:p></o:p></p>
<p class=MsoPlainText>1>vibe.lib(encodeid.obj) : error LNK2001: unresolved
external symbol _ASN1_UTF8STRING_it<o:p></o:p></p>
<p class=MsoPlainText>1>vibe.lib(icparams.obj) : error LNK2001: unresolved
external symbol _ASN1_item_d2i<o:p></o:p></p>
<p class=MsoPlainText>... and so forth ... more OpenSSL symbols ... <o:p></o:p></p>
<p class=MsoPlainText>1>C:\Toolkit\testproject2\testproject\Debug\testproject.exe
: fatal error LNK1120: 65 unresolved externals<o:p></o:p></p>
<p class=MsoPlainText>1>Build log was saved at
"file://c:\Toolkit\testproject2\testproject\testproject\Debug\BuildLog.htm"<o:p></o:p></p>
<p class=MsoPlainText>1>testproject - 252 error(s), 1 warning(s)<o:p></o:p></p>
<p class=MsoPlainText>========== Rebuild All: 0 succeeded, 1 failed, 0 skipped
==========<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Thanks again.<o:p></o:p></p>
<p class=MsoPlainText>-Michael<o:p></o:p></p>
</div>
</body>
</html>