Issue 64737
Summary [libc++] Link failures of istringstream/ostringstream/stringstream::str() on Windows
Labels libc++
Assignees pfusik
Reporter pfusik
     cat strwin.cpp
    #include <iostream>
    #include <sstream>

    int main() {
      std::cout << std::stringstream("hi").str();
    }

    cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS='clang;lld' -DLLVM_ENABLE_RUNTIMES='libcxx' -DLLVM_TARGETS_TO_BUILD=X86 -DLIBCXX_ABI_UNSTABLE=ON ..\llvm
    ninja cxx
    bin\clang-cl /std:c++17 \src\temp\strwin.cpp -Iinclude\c++\v1 lib\c++.lib
    strwin-b8a36d.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::__2::basic_string<char,struct std::__2::char_traits<char>,class std::__2::allocator<char> > __cdecl std::__2::basic_stringstream<char,struct std::__2::char_traits<char>,class std::__2::allocator<char> >::str(void)const " (__imp_?str@?$basic_stringstream@DU?$char_traits@D@__2@std@@V?$allocator@D@23@@__2@std@@QEBA?AV?$basic_string@DU?$char_traits@D@__2@std@@V?$allocator@D@23@@23@XZ) referenced in function main
    strwin.exe : fatal error LNK1120: 1 unresolved externals
    clang-cl: error: linker command failed with exit code 1120 (use -v to see invocation)

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to