I'm trying get some functionality written in C++ to communicate with Apache ActiveMQ (which natively uses JMS) located on a Linux machine. To make this connection I have tried to set up Apache ActiveMQ-CPP on my Windows 7 machine (development machine), but I am currently facing some major problems.
As far as I understand ActiveMQ-CPP has a dependency to Apache Portable Runtime/APR, as stated here. My problem is, that I cannot even build APR and hence not getting started with ActiveMQ-CPP. I have followed this guide to the letter, setting up in parallel directories, renaming version names to standard names and changing startup project to libaprutil (using dynamic libraries), but without any luck. When building the APR solution only 13 of the 27 projects succeeds. I have also tried building the solution with the static aprutil project as startup project, but without any improvement.
The solution is to ensure wider compatibility made for Visual Studio 6, so I suspect the use of Visual Studio 2010 for being responsible for my problems. Even though upgrading the project should be possible (as stated by the APR documentation), I have several (what I think is) missing dependencies in the project after using the upgrade assistant and trying to build the whole solution afterwards, see 1st screendump. Many of the errors relates to a file iconv_module.obj (error LNK2019: unresolved external symbol xxx referenced in function _iconv_getpath C:\work\apr-iconv\iconv_module.obj
), which as seen by the lower tooltip should be found in C:\work\apr-iconv
. The file is actually located in different subfolders instead, depending on the build format (I have chosen "Release" and "Win32"), but I'm not sure whether this is actually a problem or not.
I should mention, that I'm totally new to C++ and only have very limited experience with C, so maybe it's just the dependencies I do not understand to link manually... if one open the mentioned file and look at the functions stated in the error messages, however, something is clearly also wrong with the code, so maybe it's not dependencies, see both screendumps.
Regarding possible solutions I have been suggested to try building each project at a time manually, rather than the whole solution at once, so libraries not dependant of anything is build first and so on. This has, however, not been successful either.
It should also be possible to use the command line to build the project, which for some people did the trick (link). "msdev" seems to be replaced by "devenv" in newer versions of Visual Studio, but eventhough with this in mind the build still complains over "msdev not found" after using find and replace... maybe not the best fix, huh?
When searching for posts with similar problems I'm surely not alone, but unfortunately none of the suggested solutions did the trick for me. Some of the posts I looked at was: Compile Apache APR on Windows and ActiveMQ-CPP and Visual Studio 2003.
Does any of you have any experience with building APR with newer versions of Visual Studio or the command line on Windows? Or more importantly, getting ActiveMQ-CPP to work on Windows?
Screenshots: