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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:31:45+00:00 2026-05-12T08:31:45+00:00

We just had an interesting experience in trying to link a set of code

  • 0

We just had an interesting experience in trying to link a set of code compiled using Visual Studio Express 2008 with a .lib compiled with Visual Studio 2003. All in C++. To be precise, it was the SystemC 2.2.0 kernel that was compiled in VS2003 into a .lib, and a SystemC model which was compiled in VS2008.

When linking, we kept getting the error that a few symbols from the SystemC.lib file (i.e., compiled in VS2003) were not found during linking. The error we get getting was this (in a few variants):

SystemC.lib(sc_port.obj) : error LNK2001: unresolved external symbol "public: vo
id __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QB
EXXZ)

Digging on from various leads, it turned out that the function the .lib expected to find was this:

Undecoration of :- "?_Xran@_String_base@std@@QBEXXZ"
is :- "public: void __thiscall std::_String_base::_Xran(void)const "

While the library file that VS2008 was trying to link with (libcpmt.lib) used a different calling convention:

Undecoration of :- "?_Xran@_String_base@std@@SAXXZ"
is :- "public: static void __cdecl std::_String_base::_Xran(void)"

I tried to figure out why this incompatibility happened, but in the end I gave up, recompiled the exact same visual studio project in VS2008, and used that SystemC.lib instead of the one from VS2003. Now, things worked perfectly.

So the fundamental question here is: what has changed from VS2003 to VS2008 that would cause some functions to change their calling conventions? And is there some magic flag to give to the linker in VS2008 to use some other library where the functions have the same calling convention as in the VS2003 compile?

Update, summary of answers so far: It is very likely that Microsoft changes the C++ (not C, just C++) ABI from one major version of Visual Studio to the next. There can also be other changes in the libraries that cause incompatibilities. The best advice is to recompile the .lib for each version of VS. Essentially, just ship it in source to the users and have them compile it locally using whatever version of VS they happen to have installed.

The basic issue was discovered by using the advice in:

  • LNK2001 error when compiling apps referencing STLport-5.1.4 with VC++ 2008

Note that these questions did not answer this issue:

  • can you create a lib or dll in VS 2005 and link with VS 2008
  • 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-12T08:31:46+00:00Added an answer on May 12, 2026 at 8:31 am

    There is no standard for the C++ ABI. Which means that all the c++ compiler could handle a different ABI from one to the other, and that includes different version from the same compiler. You could have the same issue with 2 different major release from Gcc.
    Such modification could happen when they find a way to improve linking step.

    But ABI involve much more that that. For instance the way vtable are stored and handle behind the hood by the code generated by the compiler. If it changes, your objects and your code generated in 2008 won’t be compatible with the library expecting the way it is done in 2003.

    At this point you could understand why c++ libraries are either shipped with their source code or shipped compiled on many different architecture and compilers.

    Usually when writing a library, in order to avoid such issues, you develop it in C langage, not c++. As C comes with a standardised ABI, you are able to compile it with one compiler and then link that library with any C compiler wich respect that C ABI standard.
    For instance the way character string is implemented is standard and will probably never move (the infamous null terminated string).
    While std::string implementation changes from one Gcc major release to the other (just have a look in the basic_string class from /usr/include/c++/x.x/bits/basic_string files)

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

Sidebar

Ask A Question

Stats

  • Questions 146k
  • Answers 146k
  • 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 This will do the trick: $(function() { $('#contentDiv table table… May 12, 2026 at 9:01 am
  • Editorial Team
    Editorial Team added an answer If you know what the file is supposed to look… May 12, 2026 at 9:01 am
  • Editorial Team
    Editorial Team added an answer First of all, keep a list of every string or… May 12, 2026 at 9:01 am

Related Questions

We have this software that has a webservices component. Now, the administrator of this
I have a little logging app (written in wxPython) that receives data from a
Setup Have you ever had the experience of going into a piece of code
I have quite an interesting task at work - I need to find out
I'm on a project doing an iPhone application. We had a Cocoa consultant come

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.