Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Following this instruction , I am migrating a legacy VC++ project to MSVS2017 . I'm getting the following error currently:

eafxisd.lib(isapi.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::exception::exception(char const * const &,int)" (__imp_??0exception@std@@QAE@ABQBDH@Z) referenced in function "public: __thiscall std::bad_alloc::bad_alloc(void)" (??0bad_alloc@std@@QAE@XZ)

This is the only error left. Any ideas how to resolve it?

Update: There are also some warnings, if this is relevant:

1>eafxisd.lib(isapi.obj) : warning LNK4217: locally defined symbol ??1exception@std@@UAE@XZ (public: virtual __thiscall std::exception::~exception(void)) imported in function "public: virtual __thiscall std::bad_alloc::~bad_alloc(void)" (??1bad_alloc@std@@UAE@XZ)
1>eafxisd.lib(isapi.obj) : warning LNK4217: locally defined symbol ??0exception@std@@QAE@ABV01@@Z (public: __thiscall std::exception::exception(class std::exception const &)) imported in function "public: __thiscall std::bad_alloc::bad_alloc(class std::bad_alloc const &)" (??0bad_alloc@std@@QAE@ABV01@@Z)

I am linking the following standard libraries:

eafxisd.lib
nafxisd.lib
legacy_stdio_definitions.lib

I ignore legacy MFC libraries:

mfc80d.lib
mfcs80d.lib
                "...The constructors exception(const char * const &message) and exception(const char * const &message, int) are Microsoft extensions to the Standard C++ Library...." source: learn.microsoft.com/en-gb/cpp/standard-library/…  Have you turned of MSVC extensions in the project options?
– Richard Critten
                Oct 9, 2018 at 19:09
                How about /permissive-? learn.microsoft.com/en-us/cpp/build/reference/…  Or it could be an ABI issue if you are linking a pre-built library.
– Richard Critten
                Oct 9, 2018 at 19:16
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.