caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] camlidl - problems under windows NT
@ 2002-03-20 21:05 William D. Neumann
  2002-03-21 12:19 ` Dmitry Bely
  0 siblings, 1 reply; 2+ messages in thread
From: William D. Neumann @ 2002-03-20 21:05 UTC (permalink / raw)
  To: ocaml_beginners; +Cc: caml-list

I'm having some problems getting camlidl to work for me under windows NT
(well, not camlidl, but its output).  I created a very simple C routine,
bf.c and its associated .idl file, dumb.idl, which I processed with
camlidl...all went well here.  I then compiled bf.c, dumb.c, dumb.mli, and
dumb.ml without problems.  The problem comes when I try to use the results
of the above in a new program.  Here's what happens:

$ ocamlc -o bftest -custom bf.obj dumb.obj dumb.cmo bft.ml -cclib -lcamlidl
camlprim0.c
libcamlidl.lib(idlalloc.obj) : error LNK2001: unresolved external symbol
__imp__CoTaskMemAlloc@4
libcamlidl.lib(idlalloc.obj) : error LNK2001: unresolved external symbol
__imp__CoTaskMemFree@4
bftest.exe : fatal error LNK1120: 2 unresolved externals
Error while building custom runtime system

This happens both at a DOS prompt and under Cygwin (using the
Native Win32 port, not one compiled from source under Cygwin).  When I
perform the same steps under my OS X installation, everything works
fine.  Does anyone have any idea how to fix this?  Any help woud be
appreciated.

I apologize if this is a silly question or if I am leaving out vital
information -- I just had some very bad Japanese food for lunch and I can
barely remember my name right now...

William D. Neumann

---

"The magnum opus of rms and his Foundation is called 'GNU', a project to
completely rewrite the propritorially soiled Unix operating system. 
(Apparently, 'GNU' stands for "Gnu's Not Unix", and is proudly held to be
the world's first 'recursive acronym'. Which, of course, proves that rms
didn't get out enough in his youth.) 

	-- Nick Roberts




-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] camlidl - problems under windows NT
  2002-03-20 21:05 [Caml-list] camlidl - problems under windows NT William D. Neumann
@ 2002-03-21 12:19 ` Dmitry Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Bely @ 2002-03-21 12:19 UTC (permalink / raw)
  To: caml-list

"William D. Neumann" <wneumann@cs.unm.edu> writes:

> I'm having some problems getting camlidl to work for me under windows NT
> (well, not camlidl, but its output).  I created a very simple C routine,
> bf.c and its associated .idl file, dumb.idl, which I processed with
> camlidl...all went well here.  I then compiled bf.c, dumb.c, dumb.mli, and
> dumb.ml without problems.  The problem comes when I try to use the results
> of the above in a new program.  Here's what happens:
> 
> $ ocamlc -o bftest -custom bf.obj dumb.obj dumb.cmo bft.ml -cclib -lcamlidl
> camlprim0.c
> libcamlidl.lib(idlalloc.obj) : error LNK2001: unresolved external symbol
> __imp__CoTaskMemAlloc@4
> libcamlidl.lib(idlalloc.obj) : error LNK2001: unresolved external symbol
> __imp__CoTaskMemFree@4
> bftest.exe : fatal error LNK1120: 2 unresolved externals
> Error while building custom runtime system

You need to link ole32.lib and oleaut32.lib into resulting executable.

> This happens both at a DOS prompt and under Cygwin (using the
> Native Win32 port, not one compiled from source under Cygwin).  When I
> perform the same steps under my OS X installation, everything works
> fine.

Yes, camlild runtime library uses COM only under Windows.

Hope to hear from you soon,
Dmitry


-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-21 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-20 21:05 [Caml-list] camlidl - problems under windows NT William D. Neumann
2002-03-21 12:19 ` Dmitry Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).