#4468: Linking libstdc++ is broken on Windows
---------------------------------+------------------------------------------
    Reporter:  rl                |       Owner:              
        Type:  bug               |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.1               |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Windows           |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 `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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4468>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to