> Date: Thu, 3 Jan 2013 22:47:58 -0500
> From: "K. Frank" <[email protected]>
> 
> I see three ways to proceed:
> 
> 1) Start with the actual source (i.e., .cpp files, etc.) and put
> together my own mingw32-make-compatible makefile.  I think
> this should be relatively straightforward, but tedious, and would
> presumably represent duplicated effort.
> 
> 2) Try to translate a visual studio solution file into a makefile.
> First, I don't know how to go about doing so (solution files are
> rather different than makefiles), and second, doing so might
> trigger visual-studio-specific features (e.g., .stdafx.h files).
> 
> 3) Try to run the linux configure script -- maybe with msys -- to
> get a mingw32-make-compatible makefile, or at least a makefile
> than can be used as a starting point.  My concern here is that
> doing so would put the configure script into "linux mode" and
> would trigger the use of various linux-specific code (e.g., posix
> sockets).

The choice depends on your goals.  The first 2 alternatives will yield
a MinGW specific Makefile and build procedures, which will then need
to be maintained separately.  In my experience, the result is playing
the never-ending catch-up game with the mainstream, which is almost
always lost due to insufficient resources -- people who initially did
that lose interest and/or move on, and the MinGW build procedure is
left to bit-rot in some subdirectory.  However, if all you want is a
one-time success, this might be good enough for you, and it probably
is easier in the short run.

If your goal is to make QuickFIX support MinGW in the long run, I
would suggest the 3rd way.  It, too, requires maintenance, because new
features introduced into the package need sometimes to be "MinGW-ized"
to work correctly on Windows (or sometimes disabled).  But the amount
of such maintenance is much smaller, and it is usually met with more
sympathy by the upstream developers, because you suggest changes in
files and methods they understand very well, not in some back-yard
stuff which just uses their package as storage.

> In a sense getting QuickFIX to build with mingw shouldn't be too
> hard.  It is already written in relatively portable, non-microsofty
> c++ (because it builds on the linux side), but can be built as a
> native windows application (because it builds on the visual studio
> side).
> 
> My problem is that the build process is encoded, on the one hand,
> in automake "configure && make" scripts, and on the other hand,
> in visual studio solution files.
> 
> QuickFIX offers both linux and windows distributions.  The source
> code in the two distributions is identical.  (At least as far as I can
> tell.  It's certainly nearly identical.)  The linux / windows differences
> reside in #ifdef'ed sections of the joint code base, and the most
> notable differences I have come across are (not surprisingly) posix
> sockets vs. winsock.

What you need to do is run the configure script using MSYS, and then
analyze the config.h header file created by the script.  Compare it
with the same file provided by the VS build procedure, then make
changes to configure.ac (or whatever is its name) and its components
to yield the same in the MinGW build.  IOW, you need to have those
#ifdef's fire exactly as they do in the current VS build, by arranging
for the corresponding macros be defined as appropriate.

In addition, there could be Windows specific source files that need to
be used; in that case, you will need to modify Makefile.in or
Makefile.am to that effect.

You will have to read about Autoconf and Automake (if you don't
already know how to use them) and use their facilities.  But that is
not very complicated, and you will find a lot of real-life examples in
the package that will tell you how to do that.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to