From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA19795; Thu, 23 Oct 2003 10:31:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA27389 for ; Thu, 23 Oct 2003 10:31:08 +0200 (MET DST) Received: from mk-smarthost-3.mail.uk.tiscali.com (mk-smarthost-3.mail.uk.tiscali.com [212.74.114.39]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h9N8V7106334 for ; Thu, 23 Oct 2003 10:31:07 +0200 (MET DST) Received: from [212.74.114.6] (helo=mk-cpfrontend.uk.tiscali.com) by mk-smarthost-3.mail.uk.tiscali.com with esmtp (Exim 4.24) id 1ACas7-00026G-5G for caml-list@inria.fr; Thu, 23 Oct 2003 09:31:07 +0100 Received: from [141.228.156.225] by mk-cpfrontend.uk.tiscali.com with HTTP; Thu, 23 Oct 2003 09:31:07 +0100 Date: Thu, 23 Oct 2003 09:31:07 +0100 Message-ID: <3F94F9C4000070F4@mk-cpfrontend-4.mail.uk.tiscali.com> From: ronniec95@lineone.net To: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ronniec:01 lineone:01 binaries:01 intf:01 mlvalues:01 callback:01 stdio:01 argc:01 char:01 argv:01 argv:01 callback:01 val:01 ocamlopt:01 oflags:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Compiling native binaries on win32. Though I'm not guaranteeing anything. I got the following to work for my project but you'll need to make relevant changes. It's an interface to a proprietary messaging system which is what talaria= n_intf.cpp is. This is main.cpp #include #include #include int main(int argc,char** argv) { caml_startup(argv); callback(*caml_named_value("main"),Val_unit); return 0; } --------- This is main.ml let main () =3D print_string "Hello World" let _ =3D Callback.register "main" main --------- this is the makefile OCAML =3D ocamlopt CC =3D cl /MT /Ox OFLAGS =3D -c -output-obj OCLINKFLAGS =3D OBJECTS =3D talarian_intf.obj cppmain.obj CAMLOBJECTS =3D main.cmx INTERFACES =3D Talarian.cmi LIBPATH=3D-LIBPATH:e:/Local/"Objective Caml"/lib \ -LIBPATH:C:/"Program Files"/Talarian/ss62/lib/i86_w32 \ -LIBPATH:C:/"Program Files"/"Microsoft Visual Studio"/VC98/LIB \ -LIBPATH:C:/"Program Files"/"Microsoft Visual Studio"/VC98/MFC/LIB \ -LIBPATH:C:/"Program Files"/"Microsoft Visual Studio"/VC98/ATL/LIB= INCLUDE=3D-IE:/Local/"Objective Caml"/lib \ -IC:/"Program Files"/Talarian/ss62/include \ -IC:/"Program Files"/"Microsoft Visual Studio"/VC98/INCLUDE \ -IC:/"Program Files"/"Microsoft Visual Studio"/VC98/MFC/INCLUDE \ -IC:/"Program Files"/"Microsoft Visual Studio"/VC98/ATL/INCLUDE \ LINKFLAGS =3D ${LIBPATH} E:/Local/"Objective Caml"/lib/std_exit.obj stdl= ib.lib tipc.lib tutil.lib libasmrun.lib libunix.lib advapi32.lib wsock32.lib cam= lprog.obj /NOLOGO /subsystem:console /machine:I386 TARGET =3D go.exe all : ${TARGET} clean : rm -f ${CAMLOBJECTS} rm -f ${INTERFACES} rm -f *.cmi rm -f *.cmo rm -f *.obj rm -f *~ ${TARGET} : ${OBJECTS} ${INTERFACES} ${CAMLOBJECTS} camlprog.obj link ${OBJECTS} /OUT:${TARGET} ${LINKFLAGS} camlprog.obj : ${CAMLOBJECTS} ${OCAML} -output-obj -o camlprog.obj unix.cmxa ${CAMLOBJECTS} %.cmx : %.ml ${OCAML} ${OFLAGS} $< %.cmi : %.mli ${OCAML} -c $< %.obj : %.c ${CC} ${INCLUDE} -c $< Ronnie ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners