Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Problem using camlp4o on windows.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-27 (16:11)
From: Ed Keith <e_d_k@y...>
Subject: Problem using camlp4o on windows.
I am trying to learn to use camlp4. I started by working my way through the tutorial at

I created the file :

   open Camlp4.PreCast
   open Syntax

   EXTEND Gram
     expr: LEVEL "top"
       [ [ "for"; v = a_LIDENT; "in"; m = a_UIDENT; e = expr; "do";
           seq = sequence; "done" ->
             <:expr< $uid:m$.iter (fun $lid:v$ -> $seq$) $e$ >>
         ] ]

and complied it with the command line:

    C:\Documents and Settings\Ed Keith\My Documents\playpen\ocaml>ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c

So far so good. Then I ran into the following problem when I tried to use it. Here is the result: 

  C:\Documents and Settings\Ed Keith\My Documents\playpen\ocaml>ocaml
        Objective Caml version 3.11.0

  # #load "camlp4o.cma";;
  Characters -1--1:
    #load "camlp4o.cma";;

  Error: Reference to undefined global `Dynlink'
  # exit 0;;

I have searched the web and I am beginning to suspect that I can not use camlp4 on a windows system, is this the case? 

If so I can move to a Linux box, but if I can not use it to generate portable code it will not be very useful for me to learn it.


Ed Keith