Re: Non-MSVC build (was Re: quickfixj multiplesessions only diff Port)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Non-MSVC build (was Re: quickfixj multiplesessions only diff Port)

Maz Saeed
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html


Hi Frank,
Thanks for the quick response! I've made couple of half hearted attempts...kinda replicating creation of static library using the source files but keep running into errors due to MS specific references to libraries (other than windows.h or ws_32.lib...I've already linked those into my project) and compiler specific macros. Any instructions you can provide would be greatly appreciated! 

--Maz




-------- Original message --------
From: "K. Frank"
Date:03/18/2014 6:43 PM (GMT-06:00)
Subject: [Quickfix-developers] Non-MSVC build (was Re: quickfixj multiplesessions only diff Port)

QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html

Hello Maz!

On Tue, Mar 18, 2014 at 4:05 PM, Maz Saeed <...> wrote:
> ...
> Hi guys,
> Since we're on the subject,  wondering if anyone knows how to compile the libraries with a non Microsoft Windows C++ compiler like CodeBlocks for example running on Windows 7. Any advice would be greatly appreciated.

This was a little while ago now, but I have built and run QuickFIX
(C++ version, of course) on 64-bit windows 7 using mingw-w64
(a windows port of gcc).

It was, all in all, pretty straightforward.  There was the expected
amount of random annoyances, but no show-stoppers.

If you decide to give it a try, I could probably help you over any
rough spots you might hit.

> Thanks,
> --Maz


Good luck.


K. Frank

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers
Reply | Threaded
Open this post in threaded view
|

Re: Non-MSVC build (was Re: quickfixj multiplesessions only diff Port)

K. Frank
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html

Hi Maz!

On Tue, Mar 18, 2014 at 9:11 PM, Maz Saeed <[hidden email]> wrote:
> Hi Frank,
> Thanks for the quick response! I've made couple of half hearted
> attempts...kinda replicating creation of static library using the source
> files ...

Yes, that is what I did.  I compiled the source files, and put them
into a static library using ar.

> but keep running into errors due to MS specific references to
> libraries (other than windows.h or ws_32.lib...I've already linked those
> into my project) and compiler specific macros. Any instructions you can
> provide would be greatly appreciated!

Some general comments:

I worked with version 1.13.3.  I downloaded both the unix and
windows versions, quickfix-1.13.3.tar.gz and  quickfix-1.13.3.zip,
but that didn't matter because the source is identical -- the actual
unix / windows differences are in various ifdef's.

I did not try to use autotools (all that "configure" stuff).  I did not
try to run the test suite.  (Unfortunately, autotools and UnitTest++
add a bunch of dependencies that then have to be ported / dealt
with.)

I built this with a 64-bit version of the mingw-w64 port of gcc on
64-bit windows 7, specifically, 4.8.1.

Again, as I said in my previous message, there were a lot of random
but straightforward errors.  They were basically little msvc vs. gcc
issues, and a couple of 64-bit issues.  I mostly just knocked them
off one by one.

But there were two things that were more of an issue:

The first was also pretty trivial:  It appears that there is simply an
error in the windows part of Utility.cpp:

   result = _beginthreadex( NULL, 0, &func, var, 0, &id );

func is already a pointer, so &func is a pointer to a pointer.  I don't
see how this code could have compiled with msvc (but I don't have
msvc, so I didn't try it).  (The analogous unix version of this code
looks correct.)  Anyway, I just removed the "&" from "&func", and
that fixed the problem.

The second issue was getting the DOMDocument stuff to work.
It looks like QuickFIX is set up to use either LIBXML or MSXML.
The version of mingw-w64 that I used appears to support msxml,
but, as far as I could tell, its msxml support is broken.  However,
mingw-w64 didn't come with libxml.  Rather than try to port and
build libxml myself, I found a pre-built 64-bit-gcc windows version of
libxml.  (libxml is in c, not c++, so it's more likely to be compatible
across compiler versions.)  I did have to define HAVE_LIBXML and
decouple HAVE_LIBXML from _MSC_VER in order to get the
various ifdef's to actually use the libxml code paths.  I also had
to build QuickFIX with -DLIBXML_STATIC to get my application
to link properly with QuickFIX and libxml.

As I mentioned above, I did not run the test suite.  But I did use the
core QuickFIX functionality, and everything seemed to work.

> --Maz


Good luck.


K. Frank.


> -------- Original message --------
> From: "K. Frank"
>
> Hello Maz!
>
> On Tue, Mar 18, 2014 at 4:05 PM, Maz Saeed <...> wrote:
>> ...
>> Hi guys,
>> Since we're on the subject,  wondering if anyone knows how to compile the
>> libraries with a non Microsoft Windows C++ compiler like CodeBlocks for
>> example running on Windows 7. Any advice would be greatly appreciated.
>
> This was a little while ago now, but I have built and run QuickFIX
> (C++ version, of course) on 64-bit windows 7 using mingw-w64
> (a windows port of gcc).
> ...

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Quickfix-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfix-developers