* difficulties using camlp4
@ 2010-01-23 6:18 Grégoire Seux
2010-01-23 8:27 ` [Caml-list] " Dominique Martinet
0 siblings, 1 reply; 2+ messages in thread
From: Grégoire Seux @ 2010-01-23 6:18 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
hello,
i would like to use the Str module in a program so i should use camlp4
but when i try the following command
ocamlc -pp "camlp4o pa_extend.cmo" -I +camlp4 main.ml
the following error occurs:
> File "main.ml", line 1, characters 0-1:
Error: Error while linking main.cmo:
Reference to undefined global `Str'
could you help with this error ?
thank by advance
--
Grégoire
cell # : 94 82 33 064
[-- Attachment #2: Type: text/html, Size: 1590 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] difficulties using camlp4
2010-01-23 6:18 difficulties using camlp4 Grégoire Seux
@ 2010-01-23 8:27 ` Dominique Martinet
0 siblings, 0 replies; 2+ messages in thread
From: Dominique Martinet @ 2010-01-23 8:27 UTC (permalink / raw)
To: caml-list
Hello Greg :)
Grégoire Seux wrote on Sat, Jan 23, 2010 at 11:48:10AM +0530 :
> I would like to use the Str module in a program so i should use camlp4
I don't see why using Str would imply using camlp4 ?
to compile a program using str, you should use either
ocamlopt -o myprog str.cmxa main.ml
or
ocamlc -o myprog str.cma main.ml
You're not linking to the str module, that's why the compiler complains
about undefined things.
That appart, you might want to try ocamlfind to manage modules for you,
if you have :
ocamlfind ocaml{c,opt} -linkpkg -package str -o myprog main.ml
It's useless for str alone, but can get in handy when you have alot of
dependancies.
And by the way, if you want to use camlp4 for regexps, you might want to
take a look at mikmatch :
http://martin.jambon.free.fr/mikmatch-manual.html
Regards,
Asmadeus | Dominique Martinet
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-23 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-23 6:18 difficulties using camlp4 Grégoire Seux
2010-01-23 8:27 ` [Caml-list] " Dominique Martinet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox