From: K. F. <kfr...@gm...> - 2013-01-04 03:48:05
|
Hi Lists! What are people's thoughts on porting a linux / visual studio project to mingw and / or mingw-w64? I had asked earlier whether anyone had built QuickFIX with mingw and / or mingw-w64. I conclude from the relative silence that mingw is not directly supported by the QuickFIX project, and that no one has really tried or succeeded in building QuickFIX with mingw. So I thought I might try doing so myself. 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). 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. So, I'm not asking for a recipe to build QuickFIX in particular. Rather, I'm hoping for some wisdom on how to port a relatively clean, cross-platform (joint linux / visual studio) project to mingw, and on what tricky points I might encounter when doing so. Thanks for any advice. K. Frank |