Ticket #4468 (closed bug: fixed)
Linking libstdc++ is broken on Windows
| Reported by: | rl | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 7.0.2 |
| Component: | Compiler | Version: | 7.1 |
| Keywords: | Cc: | NeilMitchell | |
| Operating System: | Windows | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Foo.hs:
main = return ()
file.cpp:
#include <iostream>
extern "C" { void foo() { std::cout << "Hello\n"; } }
Building with:
ghc -o tst Foo.hs file.cpp -lstdc++
and then running tst.exe produces this:
tst.exe: error while loading shared libraries: libstdc++-6.dll: cannot open shared object file: No such file or directory
Adding -optl-static makes the error go away. GHC doesn't seem to ship libstdc++-6.dll but does ship libstdc++-6.dll.a which might cause the problem.
Change History
Note: See
TracTickets for help on using
tickets.
