Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 17417 invoked from network); 9 Mar 2008 12:23:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Mar 2008 12:23:33 -0000 Received: (qmail 35237 invoked by uid 500); 9 Mar 2008 12:23:29 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 35211 invoked by uid 500); 9 Mar 2008 12:23:29 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 35201 invoked by uid 99); 9 Mar 2008 12:23:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Mar 2008 05:23:29 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nadir.belkhelfa@gmail.com designates 64.233.178.244 as permitted sender) Received: from [64.233.178.244] (HELO hs-out-0708.google.com) (64.233.178.244) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Mar 2008 12:22:54 +0000 Received: by hs-out-0708.google.com with SMTP id 54so1087396hsz.8 for ; Sun, 09 Mar 2008 05:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=YmbBDWNCIqAJuVApJ7dgobSpAubsRaAWtKQYSuKGo6U=; b=WZkV9rorL/g2/y0W37h2px2Xh77HKms2nZy6SnS+8/yiGzMlbUnmvUm01FudgOWTspTn7B/IUOprUBPSsWx7UJsoR0c3hnG35acFyhbkRvE4PTZNFuW4P4487GAa698qHgEI7hPhxX4gOMxT/5byEgPylwSmsAF1h7n4dFcT9Gs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=RsQSx+YUqnMOEwt4grQsn2drWf5+lrgOictRmSMbW3GsediBDiRRFmSUf3KbLDxjAxIkua+tNsmkaEf3kneljiz//kFt5/jgoBvAnatsoZ5ssMxnWb1ORD41PrFABWUxNRBhpcnY3YS5OWbpAQJxZJgstJrGvnyxzOgRahbdMbA= Received: by 10.151.146.18 with SMTP id y18mr1853083ybn.3.1205065384786; Sun, 09 Mar 2008 05:23:04 -0700 (PDT) Received: by 10.150.52.5 with HTTP; Sun, 9 Mar 2008 05:23:04 -0700 (PDT) Message-ID: Date: Sun, 9 Mar 2008 13:23:04 +0100 From: "mohamed nadir belkhelfa" To: modules-dev@httpd.apache.org Subject: probleme with link a external library MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13856_2009995.1205065384778" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13856_2009995.1205065384778 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline hello I am das new Web programming with the API apache1.3 and I want to link static library libwarc.a that I have personally created in my program mod_warc.c For this I add to my makefile (automatically generated by apxs-g-n)the line LIB = -lwarc the compilation has produced without problem and even the execution does not generate an error, My libraie contains several function and global variables (enum) The problem is that I arrived to display the content of my enum but in the moment to execute the fonction "bless" (this fonction call malloc for allocate the memory) NULL is returned but this fuction ( the memory is not allocated) I have try to link the library otherwise by adding the option -Wl -lwarc to apxs but i have always the same results I have tried to work with a dynamic library, I have compile my library with the option-fPIC, I create the library lbwarc.so and I added makefile the line LIB = usr/local/lib/libwarc.so but I have the same results as when the use of the library static I hope that I have clearly explained the problem. My static and dynamic library running normally if I call them in a normaly C program Please send me examples or linking static and dynamic libraries is clearly shown Thanks ------=_Part_13856_2009995.1205065384778--