Ocaml graphics package












1















I have installed ocaml on my xfce and now I want to do some graphics program.
The probleme is that I don't know how I can install graphics.cma ( I think it's this file that I need but i'm not sure ).



I have research on Google and in This forum but I can't find it..



After little search, I see that i have graphics.cma and graphics.cmxa .



I found this with "ls $(ocamlc -where) | egrep cmx?a"



I don't know why but yet, my graphics function work at all.
Sorry for inconveniant.



Thanks for helping me guys.
Have a nice day










share|improve this question

























  • How did you install ocaml (opam, distro package, ... ), and what do you mean by "installing" graphics.cma ?

    – Julien
    Nov 21 '18 at 15:48











  • Hey, I have install ocaml like this : sudo apt-get install ocaml I mean that I want to use graphics function like "Graphics.open_graph x ;;"

    – Frink Léo
    Nov 21 '18 at 16:12


















1















I have installed ocaml on my xfce and now I want to do some graphics program.
The probleme is that I don't know how I can install graphics.cma ( I think it's this file that I need but i'm not sure ).



I have research on Google and in This forum but I can't find it..



After little search, I see that i have graphics.cma and graphics.cmxa .



I found this with "ls $(ocamlc -where) | egrep cmx?a"



I don't know why but yet, my graphics function work at all.
Sorry for inconveniant.



Thanks for helping me guys.
Have a nice day










share|improve this question

























  • How did you install ocaml (opam, distro package, ... ), and what do you mean by "installing" graphics.cma ?

    – Julien
    Nov 21 '18 at 15:48











  • Hey, I have install ocaml like this : sudo apt-get install ocaml I mean that I want to use graphics function like "Graphics.open_graph x ;;"

    – Frink Léo
    Nov 21 '18 at 16:12
















1












1








1








I have installed ocaml on my xfce and now I want to do some graphics program.
The probleme is that I don't know how I can install graphics.cma ( I think it's this file that I need but i'm not sure ).



I have research on Google and in This forum but I can't find it..



After little search, I see that i have graphics.cma and graphics.cmxa .



I found this with "ls $(ocamlc -where) | egrep cmx?a"



I don't know why but yet, my graphics function work at all.
Sorry for inconveniant.



Thanks for helping me guys.
Have a nice day










share|improve this question
















I have installed ocaml on my xfce and now I want to do some graphics program.
The probleme is that I don't know how I can install graphics.cma ( I think it's this file that I need but i'm not sure ).



I have research on Google and in This forum but I can't find it..



After little search, I see that i have graphics.cma and graphics.cmxa .



I found this with "ls $(ocamlc -where) | egrep cmx?a"



I don't know why but yet, my graphics function work at all.
Sorry for inconveniant.



Thanks for helping me guys.
Have a nice day







graphics ocaml






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 16:32







Frink Léo

















asked Nov 21 '18 at 15:13









Frink LéoFrink Léo

278




278













  • How did you install ocaml (opam, distro package, ... ), and what do you mean by "installing" graphics.cma ?

    – Julien
    Nov 21 '18 at 15:48











  • Hey, I have install ocaml like this : sudo apt-get install ocaml I mean that I want to use graphics function like "Graphics.open_graph x ;;"

    – Frink Léo
    Nov 21 '18 at 16:12





















  • How did you install ocaml (opam, distro package, ... ), and what do you mean by "installing" graphics.cma ?

    – Julien
    Nov 21 '18 at 15:48











  • Hey, I have install ocaml like this : sudo apt-get install ocaml I mean that I want to use graphics function like "Graphics.open_graph x ;;"

    – Frink Léo
    Nov 21 '18 at 16:12



















How did you install ocaml (opam, distro package, ... ), and what do you mean by "installing" graphics.cma ?

– Julien
Nov 21 '18 at 15:48





How did you install ocaml (opam, distro package, ... ), and what do you mean by "installing" graphics.cma ?

– Julien
Nov 21 '18 at 15:48













Hey, I have install ocaml like this : sudo apt-get install ocaml I mean that I want to use graphics function like "Graphics.open_graph x ;;"

– Frink Léo
Nov 21 '18 at 16:12







Hey, I have install ocaml like this : sudo apt-get install ocaml I mean that I want to use graphics function like "Graphics.open_graph x ;;"

– Frink Léo
Nov 21 '18 at 16:12














2 Answers
2






active

oldest

votes


















1














I would suggest installing and using ocamlfind in order to not have to worry about library location:



ocamlfind ocamlc -package graphics -linkpkg  test.ml


will compile your file with the right files loaded.
You can also load the package in the toplevel using



#use "topfind";;
#require "graphics";;





share|improve this answer































    1














    You have already installed the graphics module.



    On Debian based systems the ocaml package is split into ocaml-base-nox and ocaml-base. The later contains the graphics module while the former is trimmed down.



    The ocaml package is a meta package that depends on both of those and the description says (at the end):



    This package contains everything needed to develop OCaml applications,
    including the graphics libraries.


    So you are all set to play with graphics. Juliens answere of installing ocamlfind is a good idea though as it makes using graphics and other modules easier.






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415074%2focaml-graphics-package%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      I would suggest installing and using ocamlfind in order to not have to worry about library location:



      ocamlfind ocamlc -package graphics -linkpkg  test.ml


      will compile your file with the right files loaded.
      You can also load the package in the toplevel using



      #use "topfind";;
      #require "graphics";;





      share|improve this answer




























        1














        I would suggest installing and using ocamlfind in order to not have to worry about library location:



        ocamlfind ocamlc -package graphics -linkpkg  test.ml


        will compile your file with the right files loaded.
        You can also load the package in the toplevel using



        #use "topfind";;
        #require "graphics";;





        share|improve this answer


























          1












          1








          1







          I would suggest installing and using ocamlfind in order to not have to worry about library location:



          ocamlfind ocamlc -package graphics -linkpkg  test.ml


          will compile your file with the right files loaded.
          You can also load the package in the toplevel using



          #use "topfind";;
          #require "graphics";;





          share|improve this answer













          I would suggest installing and using ocamlfind in order to not have to worry about library location:



          ocamlfind ocamlc -package graphics -linkpkg  test.ml


          will compile your file with the right files loaded.
          You can also load the package in the toplevel using



          #use "topfind";;
          #require "graphics";;






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 '18 at 18:31









          JulienJulien

          3328




          3328

























              1














              You have already installed the graphics module.



              On Debian based systems the ocaml package is split into ocaml-base-nox and ocaml-base. The later contains the graphics module while the former is trimmed down.



              The ocaml package is a meta package that depends on both of those and the description says (at the end):



              This package contains everything needed to develop OCaml applications,
              including the graphics libraries.


              So you are all set to play with graphics. Juliens answere of installing ocamlfind is a good idea though as it makes using graphics and other modules easier.






              share|improve this answer




























                1














                You have already installed the graphics module.



                On Debian based systems the ocaml package is split into ocaml-base-nox and ocaml-base. The later contains the graphics module while the former is trimmed down.



                The ocaml package is a meta package that depends on both of those and the description says (at the end):



                This package contains everything needed to develop OCaml applications,
                including the graphics libraries.


                So you are all set to play with graphics. Juliens answere of installing ocamlfind is a good idea though as it makes using graphics and other modules easier.






                share|improve this answer


























                  1












                  1








                  1







                  You have already installed the graphics module.



                  On Debian based systems the ocaml package is split into ocaml-base-nox and ocaml-base. The later contains the graphics module while the former is trimmed down.



                  The ocaml package is a meta package that depends on both of those and the description says (at the end):



                  This package contains everything needed to develop OCaml applications,
                  including the graphics libraries.


                  So you are all set to play with graphics. Juliens answere of installing ocamlfind is a good idea though as it makes using graphics and other modules easier.






                  share|improve this answer













                  You have already installed the graphics module.



                  On Debian based systems the ocaml package is split into ocaml-base-nox and ocaml-base. The later contains the graphics module while the former is trimmed down.



                  The ocaml package is a meta package that depends on both of those and the description says (at the end):



                  This package contains everything needed to develop OCaml applications,
                  including the graphics libraries.


                  So you are all set to play with graphics. Juliens answere of installing ocamlfind is a good idea though as it makes using graphics and other modules easier.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 23 '18 at 15:11









                  Goswin von BrederlowGoswin von Brederlow

                  3,045726




                  3,045726






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415074%2focaml-graphics-package%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How to change which sound is reproduced for terminal bell?

                      Can I use Tabulator js library in my java Spring + Thymeleaf project?

                      Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents