Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 50FA19CE0 for ; Sat, 4 Feb 2012 02:27:23 +0000 (UTC) Received: (qmail 69052 invoked by uid 500); 4 Feb 2012 02:27:22 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 68889 invoked by uid 500); 4 Feb 2012 02:27:21 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 68881 invoked by uid 99); 4 Feb 2012 02:27:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 02:27:21 +0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Feb 2012 02:27:14 +0000 Received: from joe.nabble.com ([192.168.236.139]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RtVL3-0000xD-Vb for users@activemq.apache.org; Fri, 03 Feb 2012 18:26:53 -0800 Date: Fri, 3 Feb 2012 18:26:53 -0800 (PST) From: ldagum To: users@activemq.apache.org Message-ID: <1328322413957-4356396.post@n4.nabble.com> In-Reply-To: References: <1328322413963-2362325.post@n4.nabble.com> <1328322413965-2362326.post@n4.nabble.com> <1328322413966-2362327.post@n4.nabble.com> <1328322413967-2362328.post@n4.nabble.com> <1328322413969-2362329.post@n4.nabble.com> Subject: Re: Working C example? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.