httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mohamed nadir belkhelfa" <>
Subject probleme with link a external library
Date Sun, 09 Mar 2008 12:23:04 GMT

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
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 and
I added makefile the line

LIB = usr/local/lib/

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message