[rabbitmq-discuss] How to compile rabbitmq-c with visual c++ 2005?

Erik Anderson erikba at odysseus.anderson.name
Fri Feb 5 18:14:40 GMT 2010

Going through the list of digests, missed this thread.  I do have a
**basic** compile of rabbitmq-c working, but I still need to do some
massive code review, I don't believe that it's doing any error
checking at all right now for instance.  Plus as I did it as part of
my job, I'm going to be a bit slow in releasing source
(unfortunately).  I can tell you the issues that I ran into however.

amqp_framing.[ch] are not included in the source and must be
generated.  This cannot be done on a Windows machine.  Find a linux
box and follow at least part of the instructions to build these files

There are a number of references to use of a block as the result of an
expression i.e. expressions of the form "myThing = ({var innerVar;
innerVar=someFunc(); func2(); innerVar });  This structure is unknown
to MS and must be removed.  I rewrote some macros including
the caller or into a new wrapper function)

Many of the D_ and E_ macros had similar issues and needed to be
changed to functions.

All code calls to AMQP_CHECK_RESULT that expected a response needed to
be rewritten.

There are a number of refrerences in amqp_framing to empty
structures.  These need to be modified as follows:
when declaring, the braces { } must be removed
in amqp_decode_method, any attempt to dereference an empty structure
must be replaced with "*decoded = NULL"

All the datatypes in use must be typedef'ed against the MS-specific
types.  For example, "typedef unsigned __int64 uint64_t"

All socket operations must be translated to use Winsock.  The data
type of a socket changes from "int" to "SOCKET", all references to
read(),write(), close(), and errno must be changed to send(), recv(),
closesocket(), and something I haven't looked for yet

A shortcut is used to initialize structs that is not supported by MS.
The members of a struct must be initialized explicitly.  #defines
describing common structs have been changed to "static const".

Other than some of the usual porting dust, those were the highlights.
Still wanna do it?

On Jan 29, 2:42 am, Matthew Sackman <matt... at lshift.net> wrote:
> On Fri, Jan 29, 2010 at 05:32:10PM +0800, techabc wrote:
> > Can rabbitmq-c be compiled use microsoft vc8, and how?
> > My application developed with vc++, so I want it.
> It's unlikely. Rabbitmq-c is in a highly experimental state and I
> believe it contains some features of C that are specific to gcc.
> Yesterday someone else reported on this list that they managed to get
> Rabbitmq-c to compile under Windows, but it took them two weeks of
> effort. You might like to liaise with them to share the necessary
> details.
> This was mentioned near the bottom ofhttp://old.nabble.com/Re:-error-message-trying-to-start-stomp-adapter...
> Matthew
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttp://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

More information about the rabbitmq-discuss mailing list