activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephenju <>
Subject Re: Static link ActiveMQ-CPP on Mac OS X
Date Tue, 08 Nov 2011 15:47:49 GMT wrote:
> Can you give the ActiveMQ-CPP 3.4.x branch in SVN a try, I have
> back-ported some fixes that may resolve this issue.
> Thanks.
Thanks for the help. I ended up using dynamic libraries so I don't have to
deal with the compile options differences. But that's still not the end of
my problems. :(

My goal is the add CMS client functions to my existing project which is a
32-bit application bundle that needs to be able to deploy to OS X 10.5,
without installing anything to the users system. This means the application
must come with everything it needs.

The first issue is the build ActiveMQ-CPP library in 32-bit (i386). That's
not too hard since setting appropriate environment variables (CXXFLAGS &
friends) solves it. I'd like to have universal binaries (x86_64 and i386)
but it's not required yet. So I am fine.

Next I find out libapr-1 and libaprutil-1 that come with OS X 10.5 are not
compatible with ActiveMQ-CPP. The 10.6 ones are fine, but not the 10.5 ones.
So I had to build them from sources. And rebuild ActiveMQ-CPP to use my
copies of them. That is actually not too painful once I figured out where to
put everything. The point is, don't install them to the system. Not even
ActiveMQ-CPP. Use --prefix with all of them. Or Xcode will still link the
system provided ones.

Then the built libraries turn out to be using LC_DYLD_INFO command which is
not available in OS X 10.5. That rendered my app un-deployable. I finally
figured out the solution by adding "-isysroot /Xcode3/SDKs/MacOSX10.5.sdk
-mmacosx-version-min=10.5" to the various FLAGS variables. Again, rebuild
everything from scratch.

Finally, the 3 dylibs copied into my app bundle need to be changed with
install_name_tool so they can be loaded from within the bundle instead of my
development locations.

And it works!!! Well. The example code works. We'll see how it actually
works in the real code.

I may try static linking with the SVN branch later. After I recover from
this trauma... :)

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message