From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id A81BEBC37 for ; Tue, 10 Nov 2009 13:06:30 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am8BAIPm+EpDOztyi2dsb2JhbACcAQEBAQoLChrBFYQ+BIFo X-IronPort-AV: E=Sophos;i="4.44,715,1249250400"; d="scan'208";a="36493566" Received: from trironport1.altair.com ([67.59.59.114]) by mail2-smtp-roc.national.inria.fr with ESMTP; 10 Nov 2009 13:06:30 +0100 X-IronPort-AV: E=Sophos;i="4.44,715,1249272000"; d="scan'208";a="9379562" Received: from unknown (HELO trexch.prog.altair.com) ([204.235.24.100]) by trironport1.altair.com with ESMTP; 10 Nov 2009 07:06:28 -0500 Received: from dewsrv004.Europe.altair.com ([192.168.56.100]) by trexch.prog.altair.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 10 Nov 2009 07:05:43 -0500 Received: from [127.0.0.1] ([192.168.141.2]) by dewsrv004.Europe.altair.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 10 Nov 2009 13:04:36 +0100 Message-ID: <4AF9573E.1010003@altair.com> Date: Tue, 10 Nov 2009 13:06:22 +0100 From: Fady NASSIF User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Creating a dll Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Nov 2009 12:04:36.0685 (UTC) FILETIME=[F912A7D0:01CA61FD] X-Spam: no; 0.00; ocaml:01 ocamlopt:01 ocamlmklib:01 ocamlmklib:01 -oc:01 nativecclibs:01 libasmrun:01 lib:01 makefile:01 nativecclibs:01 lib:01 dlopen:01 dlopen:01 altair:98 2019:98 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