Re: [Haskell-cafe] how to link statically with a c lib ?
2009/2/8 Don Stewart : > noteed: >> 2009/2/8 Don Stewart : >> > noteed: >> >> Hi, >> >> >> >> I'm writing bindings for the Tiny C Compiler. >> >> It seems that tcc provide a libtcc.a but no libtcc.so. >> >> >> >> In my cabal file, I have >> >> >> >> extra-libraries: dl, tcc >> >> >> >> but when using the generated haskell module, >> >> I have the following message : >> >> >> >> ⟨...@jones samples⟩ ghc -e "main" Test.hs >> >> : : can't load .so/.DLL for: tcc >> >> (libtcc.so: cannot open shared object file: No such file or directory) >> >> >> >> How can I generate a module linked statically against libtcc ? >> > >> > Without a .so you can't load it in ghci, but you can compile it with ghc. >> > >> > ghc --make Test.hs >> >> Ok but what should be written in the cabal file ? >> >> I build a .so of libtcc so it works for now. >> >> Before I put it on hackage, maybe I can get a review of it, if >> anything is fundamentaly wrong ? >> It is located at http://github.com/noteed/tcc/tree/master > > In the .cabal file should only be: > >extra-libraries: tcc > > I think. > Oh I misunderstood : I thought it was the build process which was flawed, not the way ghc or ghci would handle the library. Thank you, Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] how to link statically with a c lib ?
noteed: > 2009/2/8 Don Stewart : > > noteed: > >> Hi, > >> > >> I'm writing bindings for the Tiny C Compiler. > >> It seems that tcc provide a libtcc.a but no libtcc.so. > >> > >> In my cabal file, I have > >> > >> extra-libraries: dl, tcc > >> > >> but when using the generated haskell module, > >> I have the following message : > >> > >> ⟨...@jones samples⟩ ghc -e "main" Test.hs > >> : : can't load .so/.DLL for: tcc > >> (libtcc.so: cannot open shared object file: No such file or directory) > >> > >> How can I generate a module linked statically against libtcc ? > > > > Without a .so you can't load it in ghci, but you can compile it with ghc. > > > > ghc --make Test.hs > > Ok but what should be written in the cabal file ? > > I build a .so of libtcc so it works for now. > > Before I put it on hackage, maybe I can get a review of it, if > anything is fundamentaly wrong ? > It is located at http://github.com/noteed/tcc/tree/master In the .cabal file should only be: extra-libraries: tcc I think. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] how to link statically with a c lib ?
2009/2/8 Don Stewart : > noteed: >> Hi, >> >> I'm writing bindings for the Tiny C Compiler. >> It seems that tcc provide a libtcc.a but no libtcc.so. >> >> In my cabal file, I have >> >> extra-libraries: dl, tcc >> >> but when using the generated haskell module, >> I have the following message : >> >> ⟨...@jones samples⟩ ghc -e "main" Test.hs >> : : can't load .so/.DLL for: tcc >> (libtcc.so: cannot open shared object file: No such file or directory) >> >> How can I generate a module linked statically against libtcc ? > > Without a .so you can't load it in ghci, but you can compile it with ghc. > > ghc --make Test.hs Ok but what should be written in the cabal file ? I build a .so of libtcc so it works for now. Before I put it on hackage, maybe I can get a review of it, if anything is fundamentaly wrong ? It is located at http://github.com/noteed/tcc/tree/master Thanks ! Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] how to link statically with a c lib ?
noteed: > Hi, > > I'm writing bindings for the Tiny C Compiler. > It seems that tcc provide a libtcc.a but no libtcc.so. > > In my cabal file, I have > > extra-libraries: dl, tcc > > but when using the generated haskell module, > I have the following message : > > ⟨...@jones samples⟩ ghc -e "main" Test.hs > : : can't load .so/.DLL for: tcc > (libtcc.so: cannot open shared object file: No such file or directory) > > How can I generate a module linked statically against libtcc ? Without a .so you can't load it in ghci, but you can compile it with ghc. ghc --make Test.hs -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] how to link statically with a c lib ?
Hi, I'm writing bindings for the Tiny C Compiler. It seems that tcc provide a libtcc.a but no libtcc.so. In my cabal file, I have extra-libraries: dl, tcc but when using the generated haskell module, I have the following message : ⟨...@jones samples⟩ ghc -e "main" Test.hs : : can't load .so/.DLL for: tcc (libtcc.so: cannot open shared object file: No such file or directory) How can I generate a module linked statically against libtcc ? Thanks, Thu ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe