In case anyone else wants to build the openwire C example, here's the steps
that worked for me on linux:

1. Get the apr library, build and install it on your system.  It's not
documented what version is needed, and since these things (meaning open
source packages in general, not necessarily apr) are notoriously not
backward compatible, I got v1.2.2 which was from around the time that the
openwire C client libraries were written.  To build and install libapr just
do 'configure', 'make', then as root 'make install'.

2. compile files in the libopenwire directory:
     $ cc -I/usr/local/apr/include/apr-1 -g -c *.c

3. delete one of the ow_commands_v* versions (you can't link both)
     $ rm ow_commands_v1.o

4. compile files in the libactivemq directory:
     $ cc -I/usr/local/apr/include/apr-1 -I../libopenwire -g -c *.c
   this generated a warning (haven't tested enough to say it's significant
or not):

     amqcs.c: In function 'amqcs_connect':
     amqcs.c:164: warning: passing argument 2 of 'strncpy' from incompatible
pointer type

5. compile files in examples directory and link
     $ cc -I../libactivemq/ -I../libopenwire/ -I/usr/local/apr/include/apr-1
-g -c main.c 
     $ cc -g ../libopenwire/*.o ../libactivemq/*.o  -L/usr/local/apr/lib/
-lapr-1

It's been a long while since I messed around with Makefile's, so no makefile
for you here, maybe later or someone else is game.

Cheers,

- leo


--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Working-C-example-tp2362325p4356396.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to