Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Fady NASSIF <fady@a...>
Subject: Creating a dll
Hello
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
ex:
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

Fady