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 35773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:17:19+00:00 2026-05-10T14:17:19+00:00

I’ve opened an old workspace that is a library and its test harness. It

  • 0

I’ve opened an old workspace that is a library and its test harness. It used to work fine but now doesn’t and older versions of the code don’t work either with the same errors. I’ve tried recreating the project and that causes the same errors too. Nothing seems out of order in project settings and the code generated works in the main app.

I’ve stripped out most of the files and got it down to the bare minimum to generate the error. Unfortunately, I can’t post the project as this is used in production code.

The LNK2001 linker error I get usually means I’ve left off a library or forgot to implement a virtual function. However, this is part of the standard template library – and is a header at that.

The code that is listed as having the problem in IOCompletionPort.obj doesn’t actually use std::string directly, but does call a class that does: Comms::Exception accepts a std::string and the value of GetLastError or WSAGetLastError.

The function mentioned in the error (GetMessage) is implemented but is a virtual function so other classes can override it if need be. However it appears that the compiler has made it as an ANSI version, but I can’t find any options in the settings that would control that. I suspect that might be the problem but since there’s very little in the way of options for the library I have no way of knowing for sure. However, both projects specify _MBCS in the compiler options.

——————–Configuration: TestComms – Win32 Debug——————– Linking… Comms.lib(IOCompletionPort.obj) : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits,class std::allocator > __thiscall Comms::Exception::GetMessageA(void)const " (?GetMessageA@ Exception@Comms@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) Debug/TestComms.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.

TestComms.exe – 2 error(s), 0 warning(s)

Any suggestions? I’ve lost most of the morning to this and don’t want to lose most of the afternoon too.

  • 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. 2026-05-10T14:17:19+00:00Added an answer on May 10, 2026 at 2:17 pm

    One possibility lies with Win32 ANSI/Unicode ‘name-mangling’, which turns the symbol GetMessage into either GetMessageA or GetMessageW. There are three possibilities:

    1. Windows.h hasn’t been loaded, so GetMessage stays GetMessage

    2. Windows.h was loaded with symbols set for ANSI, so GetMessage becomes GetMessageA

    3. Windows.h was loaded with symbols set for Unicode, so GetMessage becomes GetMessageW

    If you’ve compiled two different files in ways that trigger two different scenarios, you’ll get a linker error. The error message indicates that the Comms::Exception class was an instance of #2, above — perhaps it’s used somewhere that windows.h hasn’t been loaded?

    Other things I’d do in your place, just as a matter of routine:

    1) Ensure that my include and library paths don’t contain anything that I’m not expecting.

    2) Do a ‘build clean’ and then manually verify it, deleting any extra object files if necessary.

    3) Make sure there aren’t any hardcoded paths in include statements that don’t mean what they meant when the project was originally rebuilt.

    EDIT: Fighting with the formatting 🙁

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

Sidebar

Ask A Question

Stats

  • Questions 163k
  • Answers 163k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you don't have the config file, it uses the… May 12, 2026 at 12:10 pm
  • Editorial Team
    Editorial Team added an answer I would like to answer the question about what can… May 12, 2026 at 12:10 pm
  • Editorial Team
    Editorial Team added an answer String.Concat(Object) gives you String.Empty when you pass null; ToString would… May 12, 2026 at 12:10 pm

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.