From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 435CDBC37 for ; Tue, 29 Dec 2009 16:55:56 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AroAAGi1OUvYSfEMkWdsb2JhbACbTwEBAQEJCwoHEwS6FoQzBA X-IronPort-AV: E=Sophos;i="4.47,469,1257116400"; d="scan'208";a="40706355" Received: from info-smtp-004.amnh.org ([216.73.241.12]) by mail3-smtp-sop.national.inria.fr with ESMTP; 29 Dec 2009 16:55:55 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by info-smtp-004.amnh.org (Postfix) with ESMTP id 7E8391CD58C for ; Tue, 29 Dec 2009 10:55:49 -0500 (EST) X-Virus-Scanned: amavisd-new at amnh.org Received: from info-smtp-004.amnh.org ([127.0.0.1]) by localhost (info-smtp-004.amnh.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uZwpUAVdnAEF for ; Tue, 29 Dec 2009 10:55:49 -0500 (EST) Received: from webmail.amnh.org (dolce.amnh.org [216.73.241.32]) by info-smtp-004.amnh.org (Postfix) with ESMTP id 36BA01CD58B for ; Tue, 29 Dec 2009 10:55:49 -0500 (EST) Received: from 216.73.250.141 (SquirrelMail authenticated user lhong) by webmail.amnh.org with HTTP; Tue, 29 Dec 2009 10:55:49 -0500 (EST) Message-ID: <56473.216.73.250.141.1262102149.squirrel@webmail.amnh.org> Date: Tue, 29 Dec 2009 10:55:49 -0500 (EST) Subject: How to add a "non-standard" static c library to ocaml project From: "lin hong" To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.8-4.el4.centos MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam: no; 0.00; non-standard:01 ocaml:01 amnh:01 cflags:01 linking:02 static:03 static:03 library:03 library:03 hong:94 linux:07 head:90 i'm:09 struggling:88 idea:13 Hey, I'm struggling with this for few days. We have a static C library, instead of "libsomename.a", it's "somename.a", so we could not link it in the usually way like "-lsomename". In myocamlbuild.ml, I did try to add it's head files dir into cflags, and "/somelib/dir/somename.a" to clibs. This works for Mac, however, in Linux, it won't pass the linking process. Any idea is appreciated ~ Thank you. Lin