« Return to Thread: Problem compiling libstomp under Centos

Problem compiling libstomp under Centos

by juanbackson :: Rate this Message:

Reply to Author | View in Thread

Hi,

I searched google and found an instruction on how to compile libstomp under linux, but I am getting the following error:

root@localhost src]# ./compile.sh
In file included from stomp.c:22:
stomp.h:55:24: warning: no newline at end of file
stomp.c: In function 'stomp_read':
stomp.c:418: warning: passing argument 3 of 'apr_socket_recv' from incompatible pointer type
stomp.c:439:2: warning: no newline at end of file
/usr/bin/ld: cannot find -lapr-0
collect2: ld returned 1 exit status
In file included from main.c:19:
stomp.h:55:24: warning: no newline at end of file
/usr/bin/ld: cannot find -lstomp
collect2: ld returned 1 exit status
[root@localhost src]#

Here is my script:

#!/bin/bash
APACHE_HOME=/usr/src/httpd-2.2.10/srclib/apr
gcc stomp.c -shared -olibstomp.so -I. -I$APACHE_HOME/include -L$APACHE_HOME/lib -lapr-0 -fPIC
gcc main.c -ostomp -I. -I$APACHE_HOME/include -L. -lstomp



Does anyone know how to resolve this problem?

Thank you in advance for all your help.

Regards,
JB



 « Return to Thread: Problem compiling libstomp under Centos