Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4019580
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:07:19+00:00 2026-05-20T10:07:19+00:00

I am attempting to use OpenSSL’s SHA512 function in a C++ project of mine.

  • 0

I am attempting to use OpenSSL’s SHA512 function in a C++ project of mine. In order to do this, I include openssl/sha.h in my source files that call SHA512 and link with the libeay32.lib library.

SHA512 is declared in openssl/sha.h as:

extern "C" {
//...
unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md);
//...
}

When linking, however, the symbol is not found:

mysql_sha.obj : error LNK2019: unresolved external symbol _SHA512 referenced in function _sha512

The problem appears to be that in libeay32.lib, the symbol for the function is actually SHA512 (no leading underscore), and I also see __imp_SHA512 when normally it would be __imp__SHA512.

I am using the Win64 build of OpenSSL 1.0.0d from Shining Light Productions.

Why would the symbol of the SHA512 function not have a leading underscore? How do I get around this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:07:20+00:00Added an answer on May 20, 2026 at 10:07 am

    There is only one calling convention for 64-bit code. None of the nonsense of __cdecl, __stdcall, __fastcall etcetera. Whoever comes up with another x64 calling convention to save a fraction of a nanosecond is going to be summarily executed. Accordingly, DLL exports no longer have to be decorated with leading underscore and @ characters. The exported name is just plain SHA512.

    Unfortunately, that doesn’t explain why your compiler still prefixes an underscore. Sounds like you’re actually using a 32-bit compiler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In attempting to use std::select1st from <functional> in a VS2008 project I found that
Attempting to use the data series from this example no longer passes the JSONLint
Im attempting to use websockets for a project. It needs to use the ipad,
When attempting to use pandoc to convert JSON based files (.ipynb) from iPython notebook
I am attempting to use XMLParse against content that is not valid xhtml. In
I'm attempting to use MIB files in PySNMP. The code is fairly straightforward. Nothing
Im attempting to use fxCop on a C# Project as kind of basis for
I am attempting to use the function DBMS_AQ.DEQUEUE_ARRAY in Oracle 10.2.0.4.0. to browse the
Attempting to use asp.net mvc's Action Result of File. So it would seem that
I am attempting to use the 'tempfile' module for manipulating and creating text files.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.