6

I am trying to compile a project with Maven via the Visual C++ compiler and I keep getting linkage errors in regards to the std::basic_string class. I ensured that I include the < string > header file into the corresponding c++ file.

Did I miss something or did I make a silly mistake??? Please let me know where I went wrong.

[ERROR] Parsor.obj : error LNK2001: unresolved external symbol

"__declspec(dllimport) public:
    int __thiscall std::basic_string<
        char,
        struct std::char_traits<char>,
        class std::allocator<char> >::compare(
            class std::basic_string<
                char,
                struct std::char_traits<char>,
                class std::allocator<char> > const &) const"

(__imp_?compare@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEHABV12@@Z)
user667967
  • 628
  • 1
  • 8
  • 20

1 Answers1

-3

It seems that the linker settings might be incorrect in your VC++. Try a simple program to test std::strig functionality

Possible duplicate to:

unresolved external symbol..no idea

Solving “locally defined symbol” and “unresolved external symbol” that originates from the .lib files

Community
  • 1
  • 1
vidit
  • 957
  • 1
  • 8
  • 23