English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Creating a dll
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-11-10 (12:06)
From: Fady NASSIF <fady@a...>
Subject: Creating a dll
I am trying to create a library under windows, that include mixed c and 
ocaml code. I want to link this library with a third party software.
I used ocamlopt to create my objects and ocamlmklib to create the library

ocamlmklib -oc mylibrary $(OOBJS) $(LIBASM) $(NATIVECCLIBS)

where $(OOBJS)  are the ".obj" files, $(LIBASM) is the libasmrun.lib, 
and $(NATIVACCLIBS) is defined in the Makefile.config 
(NATIVECCLIBS=advapi32.lib ws2_32.lib)

when i try to link this library with my softwore, it returns errors
mylibrary.lib(sys.obj) : error LNK2019: unresolved external symbol 
__imp__rename referenced in function _caml_sys_rename
mylibrary.lib(win32.obj):error LNK2019: unresolved external symbol 
_flexdll_dlopen referenced in function _caml_dlopen
if anyone has a solution for my problem i will be thankfull.

NB: I am using the msvc port of caml version 3.11, Visual C++ 2005 and 
Microsoft SDK SP1, FlexDLL version 0.19

Thank you