Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000462OCamlOCaml generalpublic2001-07-30 20:142001-07-31 18:48
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000462: Re: ocamlopt 3.01 on win32 (msvc) requires *.lib with *.cmxa (PR#456)
Description
>The .lib
>file is built by calling Microsoft's LIB program, but apparently it
>refuses to create an empty library. (The Unix "ar" program that is
>called for the same purposes has no problems with that.)

Yeah, I initially worked around it by having something like this in my make rule:

echo. > foo.c
cl -c foo.c
lib /out:foo.lib foo.obj
rm -f foo.c foo.obj

I decided that was totally lame, and just copied the mli file into the ml file. Of course, that brings up one of my other issues with ocaml (the fact that you have to copy the mli file contents if you've got an ml file), but we've talked about that on caml-list and I suppose you wouldn't consider that a bug. :)

You might think about having the ocamlopt -a pass make the dummy .c file for compatibility with unix, since you can do the right thing with tmp names and whatnot. Maybe it's not worth it. If you point me to the code I could probably do it, but a cursory glance didn't show me where the magic happens from .cmxa -> .lib.

>> This means I need
>> to name the C implementation file something completely different so
>> that the ocamlopt -a doesn't delete it.
>It is recommended procedure anyway: the library containing the code
>for the C part of your library should be named differently than that
>generated by ocamlopt -a, which contains code for the Caml part.

This would be a good one for the tools documentation.

Thanks, and congrats on 3.02!

Chris

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002323)
administrator (administrator)
2001-07-31 18:48

See PR#456

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker