我正在与OpenSSL一起尝试使SHA512哈希函数正常工作。当我编写代码时,Visual Studio的intellisense会发现函数<div class="box" data-number="6">
Some text here
</div>
<div class="box" data-number="7" style="--d:30px">
Another text here
</div>
以及其中包含的所有参数,但是当我构建项目时,出现错误“未解析的外部符号SHA512在函数main中引用。”到目前为止,这是基于一个小示例here的结果。
stdafx.h
SHA512
test.cpp
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#define _AFX_NO_MFC_CONTROLS_IN_DIALOGS // remove support for MFC controls in dialogs
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif
#include <afx.h>
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <iostream>
// TODO: reference additional headers your program requires here
#include <openssl/sha.h>
我什至检查并确认SHA512也位于stdafx.h文件中的sha.h文件中。