Re: linking librarys into php4 extensions
| From: | David Eriksson | Date: | Thu, 04 Jul 2002 06:45:50 +0000 |
| Subject: | Re: linking librarys into php4 extensions | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-85784@lists.php.net to get a copy of this message | ||
On Wed, 3 Jul 2002, Ron Lange wrote:
> Hi,
> I have set additional headers and AC_ADD_LIBRARY_WITH_PATH in the config.m4
> of my extension to link with external libs. The php 'make --with-extension
> --with-apache=[pathtoapache]' builds w/o errors, but at the following
> apache 'configure --activate-module=src/modules/php4/libphp4.a' I get
> follwing message:
> ======== Error Output for sanity check ========
> cd ..; gcc -DLINUX=22 -I/usr/src/php-4.2.1 -I/usr/src/php-4.2.1/main
> -I/usr/src/php-4.2.1/main -I/usr/src/php-4.2.1/Zend
> -I/usr/src/php-4.2.1/Zend -I/usr/src/php-4.2.1/TSRM
> -I/usr/src/php-4.2.1/TSRM -I/usr/src/php-4.2.1 -DNO_DL_NEEDED
>
./apaci
> -o helpers/dummy helpers/dummy.c -Wl,-rpath,/usr/src/INDI/lib
> -rdynamic -L/usr/src/INDI/lib -Lmodules/php4 -L../modules/php4
> -L../../modules/php4 -lmodphp4 -llibmmem -llibndr -llibIndiComm -lcrypt
> -lresolv -lm -ldl -lnsl
> -lresolv -lcrypt -lm -lcrypt -lexpat
> /usr/i486-suse-linux/bin/ld: cannot find -llibmmem
> collect2: ld returned 1 exit status
> make: *** [dummy] Error 1
> ============= End of Error Report =============
>
> Aborting!
> I wonder since the libs libmmem, libIndiComm and libndr(*.a and *.so)
> laying in the dirs which are set by -L. Any idea?
Omit "lib". For a library called libmmem.so, you should use -lmmem as a
linker parameter.
-\- David Eriksson -/-
"I personally refuse to use inferior tools because of ideology."
- Linus Torvalds