hi, I try to interface with a c++ library but I can't link with compiled c ++ library. otest.cc: #include <caml/mlvalues.h> value incr(value i) { return...
... Hello, When gcc is fed a file that ends in '.cc', it will compile that file in c++ mode. In this mode, function names will get mangled because g++ encodes...
... I think you need extern "C" ... around the included header files too. I assume you're aware of the need for the various param and return macros to protect...
... I doubt this is true, at least if you have developer tools installed. Then you can compile the ocaml-distribution by yourself. Since a while I install...
Oliver Bandel
oliver@...
Nov 1, 2006 9:50 pm
6718
Hi, i am relatively new to ocaml and make, please forgive my simple question: I have got following directory layout: pars: read_whole.ml -> main program pars:...
philip
philip-f@...
Nov 1, 2006 10:52 pm
6719
Hi, there I recently got problems when I want to define a function which accepts an object and an integer "n" as parameter and gives out an array of n such ...
... I don't this function is such a good idea ... Part of the problem is that it doesn't change the object's id field. All objects are supposed to have a...
... You might also want to read this: http://caml.inria.fr/pub/old_caml_site/caml-list/1685.html Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing...
... Thanks for the hint. I will treat it more carefully. ... Actually, I need the ability of regenerate n new objects, including all the values as well as all...
... Then you should do this: 1) Your classes take an additional () parameter, which makes "new c" a function of type unit -> <obj> 2) Your library provides...
... thanks, it works. I also needed LDFLAGS = -fexceptions, and now I can compile. OCAMLMAKEFILE = OCamlMakefile SOURCES = stub.cc maxent.ml RESULT = test ...
Hi, is there any difference between the next two solution? value some_proc(value v) { CAMLparam1(v); // do sg CAMLreturn (Val_unit); } void some_proc(value v)...
... Use the CAMLreturn(Val_unit)! The two key issues are: 1) using a CAMLreturn... rather than a C/C++ return - which you seem to already have down pat. 2)...
Hello, I'm trying to develop some medium-sized ocaml program, but I'm a total novice. I have organized my code around a few modules/files. Unfortunately I an...
You must, as they say, be doing it wrong. The toplevel can either be linked with any number of modules, or[1] you can load any number of modules at runtime. ...
... be ... But this means that I should have the modules precompiled? Thus can I change them in the toplevel itself? How do I tell the toplevel 'redefine...
... I just wrote something about these issues, see section "Testing modules of your own program" at http://wiki.cocan.org/tips_for_using_the_ocaml_toplevel ...
... modules ... Thanks a lot. I'm going to check the OCamlMake as soon as I get some time. Currently I'm using a gnu makefile derived from some ocaml skeleton...
... Thanks for a valuable contribution. Regards Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch ...
Johann Spies
jspies@...
Nov 7, 2006 7:21 am
6734
... Ah right, weird/ancient OS. Can you move to a proper OS? Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com...
... Well, maybe you think that because you're new to ocaml. Your "next_vect" function looks quite readable and short to me. here's how I would do it (without...
I'm curious why SML of NJ includes a null function as part of its List module but OCaml left it out. I know its usage has been marginalized by pattern matching...
... It doesn't seem to be very useful. Just do that: if l = [] then ... else ... Martin -- Martin Jambon, PhD http://martin.jambon.free.fr Ce message est...
... [...] Doing some OO-wrapping around this, it maybe useful for a lot of people ;-) Ciao, Oliver...
Oliver Bandel
oliver@...
Nov 12, 2006 9:55 pm
6740
This is probably a question of personal taste, but I would not use l as a variable name when I optimize for readability. If performance is not critical I'd...
... I optimize for readability. If I understood the original question correctly, the point was to create a "polymorphic" function that works as well, say, on...