public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99695] New: Cannot static compile with C++ module
@ 2021-03-21 15:28 unlvsur at live dot com
  2024-03-07 20:47 ` [Bug c++/99695] " ppalka at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: unlvsur at live dot com @ 2021-03-21 15:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99695

            Bug ID: 99695
           Summary: Cannot static compile with C++ module
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

Hello.cc
module;
// legacy includes go here – not part of this module
import <iostream>;
import <string_view>;
export module Hello;
// the module purview starts here
// provide a function to users by exporting it
export inline void SayHello(std::string_view name)
{
        std::cout << "Hello " << name << "!\n";
}

main.cc
import Hello;

int main()
{
        SayHello("sdgsdg");
}


g++ -o main hello.o main.o -Ofast -std=c++20  -fmodules-ts -static
D:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.0.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
D:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.0.1/../../../../lib\libstdc++.a(cxx11-locale-inst.o):(.rdata$_ZTVNSt7__cxx118numpunctIcEE[_ZTVNSt7__cxx118numpunctIcEE]+0x0):
multiple definition of `vtable for std::__cxx11::numpunct<char>';
main.o:main.cc:(.rdata+0x3a0): first defined here

bunch of errors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/99695] Cannot static compile with C++ module
  2021-03-21 15:28 [Bug c++/99695] New: Cannot static compile with C++ module unlvsur at live dot com
@ 2024-03-07 20:47 ` ppalka at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-03-07 20:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99695

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ppalka at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=112588
   Target Milestone|---                         |14.0
         Resolution|---                         |FIXED

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
The testcase successfully compiles and runs for me on x86_64-pc-linux-gnu since
the PR112588 fix.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-07 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 15:28 [Bug c++/99695] New: Cannot static compile with C++ module unlvsur at live dot com
2024-03-07 20:47 ` [Bug c++/99695] " ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).