Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Linking C library with haskell in Windows (kotshie) 2. problems with wxHaskell installation (Miguel Negrao) 3. Re: Missing some functions in Hoogle (Paulo Pocinho) 4. Re: Linking C library with haskell in Windows (Stephen Tetley) ---------------------------------------------------------------------- Message: 1 Date: Sat, 26 May 2012 14:48:15 -0400 From: kotshie <kots...@gmail.com> Subject: [Haskell-beginners] Linking C library with haskell in Windows To: beginners@haskell.org Message-ID: <4fc1256f.8040...@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all, I created Haskell Bindings to the NetCDF Library on linux and everything works well, bute when trying to ported to windows, I keep receiving undefined references when linking. I changed the stdcall on the FFI's, played with the cabal file to link to different libraries, both built on VC and MinGW but still can't find the solution Linking Test.exe ... .\NetCDFRaw.o:fake:(.text+0x2eb): undefined reference to `nc_create@12' .\NetCDFRaw.o:fake:(.text+0x45f): undefined reference to `nc_open@12' .\NetCDFRaw.o:fake:(.text+0x5e5): undefined reference to `nc_def_dim@16' .\NetCDFRaw.o:fake:(.text+0x787): undefined reference to `nc_inq_dimid@12' .\NetCDFRaw.o:fake:(.text+0x92e): undefined reference to `nc_def_var@24' .\NetCDFRaw.o:fake:(.text+0xb35): undefined reference to `nc_put_att_text@16' .\NetCDFRaw.o:fake:(.text+0xd0a): undefined reference to `nc_put_att_int@24' .\NetCDFRaw.o:fake:(.text+0xf32): undefined reference to `nc_put_att_double@24' .\NetCDFRaw.o:fake:(.text+0x1148): undefined reference to `nc_inq@20' .\NetCDFRaw.o:fake:(.text+0x130e): undefined reference to `nc_inq_ndims@8' Is there something I am missing? kotshie ------------------------------ Message: 2 Date: Sat, 26 May 2012 21:08:21 +0100 From: Miguel Negrao <miguel.negrao-li...@friendlyvirus.org> Subject: [Haskell-beginners] problems with wxHaskell installation To: beginners@haskell.org Message-ID: <69cdbdae-9f13-42c0-9ab4-a2acb0d0a...@friendlyvirus.org> Content-Type: text/plain; charset=windows-1252 Hi I had wxHaskell working but since I installed the gtk2hs, which updated some packages I?m having some trouble. I?ve installed wxWidgets and wxHaskell again following the instructions in it?s webpage. When I compile a simple wxHaskell program* I get this error: dyld: Symbol not found: _wxTheAssertHandler Referenced from: /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Expected in: /usr/local/lib/libwx_baseu-2.9.3.0.0.dylib in /Users/miguelnegrao/Library/Haskell/ghc-7.0.4/lib/wxc-0.90.0.3/lib/libwxc.dylib Trace/BPT trap: 5 How can I fix this ? thank you, Miguel Negr?o I?m on OSX 10.7.3 haskell platform with ghc 7.0.4 brew info wxmac wxmac 2.8.12 http://www.wxwidgets.org /usr/local/Cellar/wxmac/2.9.3.1 (764 files, 26M) * Installed with: --devel https://github.com/mxcl/homebrew/commits/master/Library/Formula/wxmac.rb cabal info wx * wx (library) Synopsis: wxHaskell Versions available: 0.11.1.0, 0.11.1.2, 0.12.1.4, 0.12.1.5, 0.12.1.6, 0.13.2, 0.13.2.1, 0.90, 0.90.0.1 (and 10 others) Versions installed: 0.13.1, 0.90 Program : module Main where import Graphics.UI.WX main :: IO() main = start gui gui :: IO() gui = do f <- frame [text := "window"] txt <- staticText f [text:= "test 123"] but <- button f [text:="button", on command:=set txt [text:="clicked"]] check <- checkBox f [text:="test"] rbox <- radioBox f Vertical ["hello","wold"] [] set f [layout:= boxed "all" (row 0 [ column 0 [widget check, widget rbox], boxed "second2" $ column 0 [widget txt, widget but] ]) ] return () ------------------------------ Message: 3 Date: Sat, 26 May 2012 22:54:22 +0100 From: Paulo Pocinho <poci...@gmail.com> Subject: Re: [Haskell-beginners] Missing some functions in Hoogle To: Ken Kawamoto <kentaro.kawam...@gmail.com> Cc: beginners@haskell.org Message-ID: <cak4i1qsqdarrxpfyhehwuxlfo9dcs3m1pj9f+9sytori-c5...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 On 25 May 2012 15:04, Ken Kawamoto <kentaro.kawam...@gmail.com> wrote: > Thanks Paulo for your comment and sorry for late reply. > > On Tue, May 22, 2012 at 11:09 PM, Paulo Pocinho <poci...@gmail.com> wrote: >> After testing Hoogle cabal package [4], it can either generate >> databases for the current system or fetch the database from the >> internet. However, database search only covered standard libraries. > > What does this part mean? > With Hoogle package, you can generate databases for any library, but > the search works only for standard libraries? > > Although this is consistent with what I experienced, it's a bit > surprising because this means generating database doesn't make any > sense, does it? Exactly. By default, hoogle did not index every library installed in my system. There is a flag for database creation with haddock [1]. However, I found it a bit complicated [2]. > Hayhoo seems to suit what I want. I must correct myself: it searches all packages from Hackage, including all function *and* type definitions [3]. Works like a charm. -- 1. http://www.haskell.org/haskellwiki/Hoogle#Database_Creation 2. http://neilmitchell.blogspot.pt/2008/08/hoogle-database-generation.html 3. http://holumbus.fh-wedel.de/hayoo/hayoo.html Regards, Paulo ------------------------------ Message: 4 Date: Sun, 27 May 2012 07:12:06 +0100 From: Stephen Tetley <stephen.tet...@gmail.com> Subject: Re: [Haskell-beginners] Linking C library with haskell in Windows To: kotshie <kots...@gmail.com> Cc: beginners@haskell.org Message-ID: <CAB2TPRBp-9iFy=w6sjz+vnvgp9xpkwmblw+ycoohf5fruup...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 I don't think changing the calling convention in the binding source code is a good idea. If you can build the original C library with MinGW it should have the same calling convention as Linux. WinAPI uses stdcall and possibly DLLs compiled with VC do (tip - don't use VC DLLs if you don't have to), but otherwise you should be using ccall. On 26 May 2012 19:48, kotshie <kots...@gmail.com> wrote: > I changed the stdcall on the FFI's, played with the cabal file to link to > different libraries, both built on VC and MinGW but still can't find the > solution ------------------------------ _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners End of Beginners Digest, Vol 47, Issue 22 *****************************************