run "/usr/bin/apr-1-config --cppflags --cflags" and put these flags into the build script
-----Original Message----- From: Hightower, Rick [mailto:rick.highto...@corventis.com] Sent: Thursday, January 28, 2010 7:14 PM To: Hightower, Rick; users@activemq.apache.org Subject: RE: C support for ActiveMQ... care to share a make file? Ok so the library built fine. Whoo hoo! Following the instructions from here (which are based on the JBoss instructions but adapted to Debian). http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li .html Then I tried to build the example main.c. The main.c is an example program that sends and then receives a message. I am getting no love. It seems it is getting compile errors from headers that it is including from stomp.h. I adapted their build.sh to build just the main.c file as follows: #!/bin/bash gcc -fPIC src/main.c -omain -l./ target/debug/shared/libstomp.so -I. -I./src -I/usr/include/apr-1.0 -lapr-1 Then I get these error messages.... r...@debian:~/tools/libstomp$ ./buildmain.sh In file included from /usr/include/apr-1.0/apr_general.h:28, from src/stomp.h:20, from src/main.c:19: /usr/include/apr-1.0/apr.h:273: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'apr_off_t' In file included from /usr/include/apr-1.0/apr_file_io.h:29, from /usr/include/apr-1.0/apr_network_io.h:26, from src/stomp.h:21, from src/main.c:19: /usr/include/apr-1.0/apr_file_info.h:206: error: expected specifier-qualifier-list before 'apr_off_t' In file included from /usr/include/apr-1.0/apr_network_io.h:26, from src/stomp.h:21, from src/main.c:19: /usr/include/apr-1.0/apr_file_io.h:551: error: expected declaration specifiers or '...' before 'apr_off_t' /usr/include/apr-1.0/apr_file_io.h:749: error: expected declaration specifiers or '...' before 'apr_off_t' In file included from src/stomp.h:21, from src/main.c:19: /usr/include/apr-1.0/apr_network_io.h:549: error: expected declaration specifiers or '...' before 'apr_off_t' -----Original Message----- From: Hightower, Rick Sent: Thursday, January 28, 2010 3:29 PM To: users@activemq.apache.org Subject: RE: C support for ActiveMQ... care to share a make file? BTW This is a good link too http://bivald.com/lessons-learned/2009/11/building_libstomp_client_on_li .html as it only covers libstomp (also on Debian which I am using). -----Original Message----- From: Pothier, Peter [mailto:ppoth...@crossbeamsys.com] Sent: Thursday, January 28, 2010 3:16 PM To: users@activemq.apache.org Subject: RE: C support for ActiveMQ... care to share a make file? Check out step 5 http://community.jboss.org/wiki/buildingblacktie on building libstomp. -----Original Message----- From: Hightower, Rick [mailto:rick.highto...@corventis.com] Sent: Thursday, January 28, 2010 6:11 PM To: users@activemq.apache.org Subject: C support for ActiveMQ... care to share a make file? I need to do some messaging between C, Python and Java. I have used ActiveMQ in the past, and feel comfortable with it. This is an R&D, proof of concept type project for the next version of our product. We have a variety of ways to do messaging between Java, Python and C processes. We would like to standardize on one way as we need to increase the amount of communication. I am trying to get some proof of concepts done to test out ActiveMQ (my first choice), versus Apache QPID (second choice) or something else. I downloaded the example for the stomp.py and got the Python example working no problem. Now... I am trying to get the Stomp C bits working. There is no make file! DOH! Ok ok... I don't mind creating one (I just need to figure out which libs this needs). I am building and using on Linux (Debian to be specific.) (Stomp is a text based protocol for messaging that ActiveMQ and JBoss MQ support.) Since the Stomp C lib is not there, I figured I would just try out Apache QPID. But wait... Apache QPID does not have C client lib. They only have a C++ client. Hmmm scratch that. So I figured why not give RabbitMQ a try. Their C lib is "experimental". Hmmm... This does not seem much better than Stomp C's support. (Apache QPID implements AMQP.) Ok this made me focus back to ActiveMQ and take a look at their C support for OpenWire. No make file. There is a X Code project file. Since I need to run this on Debian... this does not help me much. Again I would need to create my own make file (and figure out which libs this lib needs). Also the C lib is in the Sandbox. (OpenWire is ActiveMQ's native wire format which is also a standard, except of course that they are the only one's that implement it). I've come to the conclusion that the C support for MOM is not really there. Since C is very popular, I wonder why this is not a more well worn path. It does not matter if you are using OpenWire, AMQP, Stomp, whatever... this path is all full of tall grass... seems really easy to get bogged down in the weeds. Does anyone have any experience using C OpenWire or C Stomp client libs with ActiveMQ? If so, do you care to share your make files? I am going to go to lunch and then if I don't get pulled of this R&D effort to work on some pressing current release effort... I am going to create a make file for Stomp C support. Rick Hightower Chief Architect Corventis Corp Bio: http://docs.google.com/View?docid=dw4ms58_7ghf4wbc4 Blog: http://www.jroller.com/page/RickHigh Resume: http://www.linkedin.com/in/rickhigh Twitter: http://twitter.com/RickHigh Profile: http://java.dzone.com/users/rhightower JDJ: http://rickhightower.sys-con.com/latest/articles