Hello,
I'm using Visual C++ 6.0 in Visual Studio 6.0, SP6 on a Windows XP computer.
I'm trying to build an existing C++ source program that was originally created in Visual Studio 6.0, SP6 environment. I downloaded the source from SourceForge.net.
I have the source Workspace loaded into the C++ IDE, but when I try to Build All, it gives an error.
Here is a link of where to get this source code:
https://sourceforge.net/projects/mmm3/files/magic/2.94%20b19/
Here is what I get when I try to Build\Build All:
Build Log
--------------------Configuration: Magic - Win32 ReleaseMinDep--------------------
Command Lines
Creating temporary file "C:\DOCUME~1\ADMINI~1.NEX\LOCALS~1\Temp\RSP372.tmp" with contents
[
/nologo /Zp1 /MD /W4 /Gi /GX /O2 /I "htmlhelp" /I "ssl" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_HTML_HELP" /D "_AFXEXT" /D "_AFXDLL" /Fp"ReleaseMinDep/Magic.pch" /Yu"StdAfx.h" /Fo"ReleaseMinDep/" /Fd"ReleaseMinDep/" /FD /c
"C:\magic-294b19-src\Mailbox.cpp"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1.NEX\LOCALS~1\Temp\RSP372.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1.NEX\LOCALS~1\Temp\RSP373.tmp" with contents
[
/nologo /Zp1 /MD /W4 /Gi /GX /O2 /I "htmlhelp" /I "ssl" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_HTML_HELP" /D "_AFXEXT" /D "_AFXDLL" /Fo"ReleaseMinDep/" /Fd"ReleaseMinDep/" /FD /c
"C:\OpenSSL-Win32\include\openssl\applink.c"
]
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1.NEX\LOCALS~1\Temp\RSP373.tmp"
Creating temporary file "C:\DOCUME~1\ADMINI~1.NEX\LOCALS~1\Temp\RSP374.tmp" with contents
[
htmlhelp/htmlhelp.lib winmm.lib /nologo /subsystem:windows /incremental:yes /pdb:"ReleaseMinDep/Magic.pdb" /machine:I386 /out:"ReleaseMinDep/Magic.exe"
".\ReleaseMinDep\ActPPage.obj"
".\ReleaseMinDep\AdvOptionsPage.obj"
".\ReleaseMinDep\base64.obj"
".\ReleaseMinDep\blowfish.obj"
".\ReleaseMinDep\clipbrd.obj"
".\ReleaseMinDep\Color.obj"
".\ReleaseMinDep\CommandPage.obj"
".\ReleaseMinDep\cregexp.obj"
".\ReleaseMinDep\DFilters.obj"
".\ReleaseMinDep\diction.obj"
".\ReleaseMinDep\DNewImport.obj"
".\ReleaseMinDep\DPassword.obj"
".\ReleaseMinDep\EnBitmap.obj"
".\ReleaseMinDep\Excerpt.obj"
".\ReleaseMinDep\ExcerptView.obj"
".\ReleaseMinDep\GeneralPage.obj"
".\ReleaseMinDep\GetWinVer.obj"
".\ReleaseMinDep\HeaderPage.obj"
".\ReleaseMinDep\ListViewEx.obj"
".\ReleaseMinDep\LogPage.obj"
".\ReleaseMinDep\Magic.obj"
".\ReleaseMinDep\MagicDoc.obj"
".\ReleaseMinDep\MagicFrame.obj"
".\ReleaseMinDep\Mailbox.obj"
".\ReleaseMinDep\MailboxView.obj"
".\ReleaseMinDep\MD5.OBJ"
".\ReleaseMinDep\MessagePage.obj"
".\ReleaseMinDep\MIME.obj"
".\ReleaseMinDep\oneinst.obj"
".\ReleaseMinDep\OptionsPage.obj"
".\ReleaseMinDep\PlaybackPage.obj"
".\ReleaseMinDep\RawHead.obj"
".\ReleaseMinDep\REGISTRY.OBJ"
".\ReleaseMinDep\SecureString.obj"
".\ReleaseMinDep\ServerPage.obj"
".\ReleaseMinDep\StdAfx.obj"
".\ReleaseMinDep\TitleTip.obj"
".\ReleaseMinDep\tools.obj"
".\ReleaseMinDep\WatchDog.obj"
".\ReleaseMinDep\CONNECTS.OBJ"
".\ReleaseMinDep\OpenSSLConnector.obj"
".\ReleaseMinDep\OpenSSLConnectorBase.obj"
".\ReleaseMinDep\UsesOpenSSL.obj"
".\ReleaseMinDep\Magic.res"
".\ReleaseMinDep\applink.obj"
".\ReleaseMinDep\About.lib"
]
Creating command line "link.exe @C:\DOCUME~1\ADMINI~1.NEX\LOCALS~1\Temp\RSP374.tmp"
Output Window
Compiling...
Mailbox.cpp
C:\magic-294b19-src\Mailbox.cpp(333) : error C2065: 'SSLv2_client_method' : undeclared identifier
Error executing cl.exe.
Results
Magic.exe - 1 error(s), 0 warning(s)
|
I'm trying to fix the error on this line: "C:\magic-294b19-src\Mailbox.cpp(333) : error C2065: 'SSLv2_client_method' : undeclared identifier"
Here is the code where the error is occurring in a file called Mailbox.cpp:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
void CMailbox::SetState( int intState )
{
if( STATE_FINAL( m_intState ) && !STATE_FINAL( intState ) )
{
m_strLastError.Empty();
#ifdef USE_SSL
if (m_dwFlags & MBF_SSL)
{
m_pSSLctx = SSL_CTX_new(SSLv2_client_method());
m_pSSL = SSL_new(m_pSSLctx);
m_SSL.CreateConnector(m_pSSLctx);
m_SSL.Create();
}
else
#endif
Create();
}
|
Here is the code that contains the called function in a file called ssl.h:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
/* This sets the 'default' SSL version that SSL_new() will create */
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
# ifndef OPENSSL_NO_SSL2
const SSL_METHOD *SSLv2_method(void); /* SSLv2 */
const SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */
const SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */
# endif
# ifndef OPENSSL_NO_SSL3_METHOD
const SSL_METHOD *SSLv3_method(void); /* SSLv3 */
const SSL_METHOD *SSLv3_server_method(void); /* SSLv3 */
const SSL_METHOD *SSLv3_client_method(void); /* SSLv3 */
# endif
|
I tried putting #include <openssl/ssl.h> in the Mailbox.cpp file.
If I change "SSLv2_client_method()" to "SSLv3_client_method()", it finds the reference and compiles without errors. If it can find it when I change it to v3, why can't it find it if it is v2?
Does anybody know how to fix this error?
Any help would be gratefully appreciated.
Thanks,
Tony