Browse thread
[Caml-list] ocamlmklib on Windows
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Xavier Leroy <xavier.leroy@i...> |
| Subject: | Re: [Caml-list] ocamlmklib on Windows |
> That don't seems to be correct. Dynamic and static libs can be linked > with any Win32 compiler from the same set of object files. To illustrate > this, just let me quote myself At least with the version of VC++ I use, your example stops working when you put the .obj files *in a static library* (which is the point of the exercise): cl -c -MD lib.c # static linking cl -MD main.c lib.obj # LINK : warning LNK4049: locally defined symbol "_x" imported # but main.exe still works (the warhing can be supressed) # static linking via a static lib lib /out:staticlib.lib lib.obj cl -MD main.c staticlib.lib # main.obj : error LNK2001: unresolved external symbol __imp__x # main.exe : fatal error LNK1120: 1 unresolved externals If you know how to work around this, that'd be great. I'd suggest we take this discussion off caml-list, though, as DLL hackery is getting out of topic. - Xavier Leroy ------------------- 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