Ocaml graphics package
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
add a comment |
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
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
add a comment |
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
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
graphics ocaml
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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";;
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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";;
add a comment |
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";;
add a comment |
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";;
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";;
answered Nov 21 '18 at 18:31
JulienJulien
3328
3328
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 23 '18 at 15:11
Goswin von BrederlowGoswin von Brederlow
3,045726
3,045726
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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