<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/6bcb9a4ac2176599c516764078bcdc49"
  from="Ed Keith &lt;e_d_k@y...&gt;"
  author="Ed Keith"
  date="2009-01-27T16:11:56"
  subject="Problem using camlp4o on windows."
  prev="2009/01/e0c885a82a80905f27ea953e549edbf7"
  next="2009/01/0bfe95057adebded20672ce44202771d"
  next-in-thread="2009/01/dc4838648ee464a8ff2068d149137178"
  prev-thread="2009/01/f5bd2d6c64c874aac998705e20700717"
  next-thread="2009/01/b8fa82634e54fd25d86aeafd55576128"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Problem using camlp4o on windows.">
<msg 
  url="2009/01/6bcb9a4ac2176599c516764078bcdc49"
  from="Ed Keith &lt;e_d_k@y...&gt;"
  author="Ed Keith"
  date="2009-01-27T16:11:56"
  subject="Problem using camlp4o on windows.">
<msg 
  url="2009/01/dc4838648ee464a8ff2068d149137178"
  from="Matthieu Wipliez &lt;mwipliez@y...&gt;"
  author="Matthieu Wipliez"
  date="2009-01-27T16:37:37"
  subject="Re : [Caml-list] Problem using camlp4o on windows.">
</msg>
</msg>
</thread>

<contents>
I am trying to learn to use camlp4. I started by working my way through the tutorial at http://www.ocaml-tutorial.org/camlp4_3.10/foreach_tutorial

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" -&gt;
             &lt;:expr&lt; $uid:m$.iter (fun $lid:v$ -&gt; $seq$) $e$ &gt;&gt;
         ] ]
     ;
   END

and complied it with the command line:

    C:\Documents and Settings\Ed Keith\My Documents\playpen\ocaml&gt;ocamlc -I +camlp4 camlp4lib.cma -pp camlp4orf -c pa_foreach.ml

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&gt;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.

    -EdK


Ed Keith
e_d_k@yahoo.com

Blog: edkeith.blogspot.com



      

</contents>

</message>

