
HOpenGL consists of two packages: OpenGL and GLUT, and the latter implies the former, so
ghc -package GLUT --make Hello.hs
Nope :( says GLUT is unknown package.
should work. To see which packages are installed, you can use
ghc-pkg -l
And surprizingly this gives the result rts, base, haskell98, network, haskell-src, readline, unix, lang, concurrent, posix, util, data, text, net, hssource which means neither HOpenGL, nor GLUT comes preinstalled in ghc-6.0.1 :(. Any solutions ?? Arun Kumar S Jadhav, MTech 1st Year, KReSIT, IIT-Bombay Bombay ------------------------------------ Never negotiate out of fear Never fear to negotiate

Arunkumar S Jadhav wrote:
[...] which means neither HOpenGL, nor GLUT comes preinstalled in ghc-6.0.1 :(. Any solutions ??
It's a decision of the packager whether HOpenGL is supported or not (you didn't write what binary package you use or if you built GHC for yourself). If it's not there, you have to build GHC for yourself, adding `--enable-hopengl' to configure's commandline. There are activities to make installation of separate packages easy for the end-user (see http://www.haskell.org/mailman/listinfo/libraries), so problems like this should be easier to fix in the future. Cheers, S.

On Sun, 21 Sep 2003, Sven Panne wrote:
It's a decision of the packager whether HOpenGL is supported or not (you didn't write what binary package you use or if you built GHC for yourself). If it's not there, you have to build GHC for yourself, adding `--enable-hopengl' to configure's commandline. Thanks a lot !! I rebuilt with --enable-hopengl option, now GLUT is included in package.conf, all is well now except that ghc is complaining about GL, and GLU packages. Can't these packages be installed in one shot?
-Regards, Arun

Arunkumar S Jadhav wrote:
[...] all is well now except that ghc is complaining about GL, and GLU packages. Can't these packages be installed in one shot?
Hmmm, there are no GL and GLU packages: With `--enable-hopengl' you get an OpenGL package (containing the GL/GLU API, there is no point in distinguishing these parts IMHO) and a GLUT package. The latter depends on the former, and both are "auto" packages, so even a plain ghc --make Hello.hs should work for your setup. What is the output of: ghc-pkg -l ghc-pkg -s OpenGL ghc-pkg -s GLUT Cheers, S.

should work for your setup. What is the output of:
ghc-pkg -l
/usr/local/lib/ghc-6.0.1/package.conf: rts, base, haskell98, network, haskell-src, readline, OpenGL, GLUT, unix, lang, concurrent, posix, util, data, text, net, hssource
ghc-pkg -s OpenGL
Package {name = "OpenGL", auto = True, import_dirs = ["$libdir/imports"], source_dirs = [], library_dirs = ["$libdir"], hs_libraries = ["HSOpenGL"], extra_libraries = ["HSOpenGL_cbits"], include_dirs = [], c_includes = ["HsOpenGL.h"], package_deps = ["base"], extra_ghc_opts = [], extra_cc_opts = ["", "-I/usr/X11R6/include"], extra_ld_opts = ["", "-lGLU", "-lGL", "-L/usr/X11R6/lib", "-lSM", "-lICE", "-lXext", "-lX11", "-lm"], framework_dirs = [], extra_frameworks = []}
ghc-pkg -s GLUT
Package {name = "GLUT", auto = True, import_dirs = ["$libdir/imports"], source_dirs = [], library_dirs = ["$libdir"], hs_libraries = ["HSGLUT"], extra_libraries = ["HSGLUT_cbits"], include_dirs = [], c_includes = ["HsGLUT.h"], package_deps = ["base", "OpenGL"], extra_ghc_opts = [], extra_cc_opts = ["", "-I/usr/X11R6/include"], extra_ld_opts = ["", "-lglut", "-L/usr/X11R6/lib", "-lSM", "-lICE", "-lXmu", "-lXt", "-lXi", "-lXext", "-lX11", "-lm"], framework_dirs = [], extra_frameworks = []} ----------------------------------------------------------------------- Regards, -- Arun Kumar S Jadhav Masters Student, SIC-309, KReSIT, IIT-Bombay, India Ph: +91-22-25764967 http://www.it.iitb.ac.in/~arunk ***************************** Never negotiate out of fear Never fear to negotiate *****************************
participants (3)
-
Arun Kumar S Jadhav
-
Arunkumar S Jadhav
-
Sven Panne