QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html Hey Frank, First off, which version of QuickFIX are you working with? 1.13.3 And which version of which compiler? GNU GCC Compiler A.K.A. mingw32-g++.exe Thanks, --Maz ------- Original Message ------- >From : K. Frank[mailto:[hidden email]] Sent : 3/24/2014 5:33:23 PM To : [hidden email] Cc : Subject : RE: Re: [Quickfix-developers] Non-MSVC build(wasRe:quickfixjmultiplesessions only diff Port) QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Hi Maz! On Mon, Mar 24, 2014 at 3:46 PM, Maz Saeed <[hidden email]> wrote: > Hey Frank, > Starting to compile with MINGW, getting all kinds of errors -- mostly the include related. For starters, do you know where I could find these header files and associated > libraries? > > #include <sys/socket.h> > #include <sys/ioctl.h> > #include <netinet/in.h> > #include <netinet/tcp.h> > #include <arpa/inet.h> > #include <netdb.h> > #include <fcntl.h> > #include <unistd.h> > #include <pthread.h> > #include <signal.h> First off, which version of QuickFIX are you working with? And which version of which compiler? Are you using a mingw or mingw-w64 version of gcc? If so, which one, i.e., what is the output of "g++ --version"? Also, do you want a 32-bit or 64-bit build? (There were a couple of 64-bit incompatibilities I had to change.) There is an important top-level thing I neglected to mention. To first approximation, you will want to be using the windows-api code paths through the ifdef's. For the most part the windows ifdef-paths are triggered by "#ifdef _MSC_VER". The QuickFIX code is a little imperfect in that _MSC_VER typically indicates that the msvc compiler is being used, while _WIN32 typically indicates that the windows api is being used. These are two different things, but QuickFIX seems to be using _MSC_VER for both purposes. You want to use the windows api (because you will be running on windows rather than on unix or a unix emulator), but you aren't using msvc (and I assume that you are using one of the mingw ports of gcc). So you will typically have _WIN32 defined (e.g., I believe that _WIN32 is normally defined automatically by mingw-w64), but you won't have _MSC_VER defined, because your compiler is not a version of msvc. I thought it was cleaner NOT to simply define _MSC_VER (because it would be incorrect to claim that I was using msvc). So I chose to change _most_ of the occurrences of _MSC_VER in the code to _WIN32. For example, in my copy of Utility.h (I assume that yours is similar, if not identical.), I have the following #include's: #ifdef _MSC_VER // <-- change this to _WIN32 ///////////////////////////////////////////// #include <Winsock2.h> // <-- these are windows-api headers #include <process.h> #include <direct.h> #include <time.h> typedef int socklen_t; ///////////////////////////////////////////// #else ///////////////////////////////////////////// #include <sys/types.h> // <-- these are posix headers #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/stat.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> #include <netdb.h> #include <fcntl.h> #include <unistd.h> #include <pthread.h> #include <signal.h> #include <errno.h> #include <time.h> #include <stdlib.h> ///////////////////////////////////////////// #endif So if you change _MSC_VER to _WIN32 as indicated above, you will now be including the windows headers rather than the posix headers (that you don't have). There are occurrences of _MSC_VER scattered throughout the QuickFIX code base. From memory, I changed most, but not all of these to _WIN32. Just start compiling, and when errors show up see if _MSC_VER is involved, and if it makes sense, change it to _WIN32. Note that the first include file in the windows section is: #include <Winsock2.h> This reminds me of something. Not when you compile and "ar"-ing the static QuickFIX library, but when you link your application to that library, you will need to specify some libraries in the link command, Winsock2.h is for the windows socket implementation that resides in a library that you will have to link to. At least with mingw-w64, you do this by specifying -lws2_32 at the end of the link command. More completely, I had to specify the following libraries: -lxml2 -lz -liconv -lws2_32 This is because (as mentioned in my earlier posting) I told QuickFIX to use "LIBXML" rather than "MSXML", and then found a windows build of libxml. "-lxml2" is for that. "-lz" and "-liconv" are for libraries used by that libxml implementation. > 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 |
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html Hey Frank, Thanks for a concrete set of instructions on compiler detection macros! Your instructions make perfect sense! I'll have another go at it and hope to make more headway this time. Hope you got my email from last night about the FIX and compiler version. --Maz ------- Original Message ------- >From : K. Frank[mailto:[hidden email]] Sent : 3/24/2014 5:33:23 PM To : [hidden email] Cc : Subject : RE: Re: [Quickfix-developers] Non-MSVC build(wasRe:quickfixjmultiplesessions only diff Port) QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Hi Maz! On Mon, Mar 24, 2014 at 3:46 PM, Maz Saeed <[hidden email]> wrote: > Hey Frank, > Starting to compile with MINGW, getting all kinds of errors -- mostly the include related. For starters, do you know where I could find these header files and associated > libraries? > > #include <sys/socket.h> > #include <sys/ioctl.h> > #include <netinet/in.h> > #include <netinet/tcp.h> > #include <arpa/inet.h> > #include <netdb.h> > #include <fcntl.h> > #include <unistd.h> > #include <pthread.h> > #include <signal.h> First off, which version of QuickFIX are you working with? And which version of which compiler? Are you using a mingw or mingw-w64 version of gcc? If so, which one, i.e., what is the output of "g++ --version"? Also, do you want a 32-bit or 64-bit build? (There were a couple of 64-bit incompatibilities I had to change.) There is an important top-level thing I neglected to mention. To first approximation, you will want to be using the windows-api code paths through the ifdef's. For the most part the windows ifdef-paths are triggered by "#ifdef _MSC_VER". The QuickFIX code is a little imperfect in that _MSC_VER typically indicates that the msvc compiler is being used, while _WIN32 typically indicates that the windows api is being used. These are two different things, but QuickFIX seems to be using _MSC_VER for both purposes. You want to use the windows api (because you will be running on windows rather than on unix or a unix emulator), but you aren't using msvc (and I assume that you are using one of the mingw ports of gcc). So you will typically have _WIN32 defined (e.g., I believe that _WIN32 is normally defined automatically by mingw-w64), but you won't have _MSC_VER defined, because your compiler is not a version of msvc. I thought it was cleaner NOT to simply define _MSC_VER (because it would be incorrect to claim that I was using msvc). So I chose to change _most_ of the occurrences of _MSC_VER in the code to _WIN32. For example, in my copy of Utility.h (I assume that yours is similar, if not identical.), I have the following #include's: #ifdef _MSC_VER // <-- change this to _WIN32 ///////////////////////////////////////////// #include <Winsock2.h> // <-- these are windows-api headers #include <process.h> #include <direct.h> #include <time.h> typedef int socklen_t; ///////////////////////////////////////////// #else ///////////////////////////////////////////// #include <sys/types.h> // <-- these are posix headers #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/stat.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> #include <netdb.h> #include <fcntl.h> #include <unistd.h> #include <pthread.h> #include <signal.h> #include <errno.h> #include <time.h> #include <stdlib.h> ///////////////////////////////////////////// #endif So if you change _MSC_VER to _WIN32 as indicated above, you will now be including the windows headers rather than the posix headers (that you don't have). There are occurrences of _MSC_VER scattered throughout the QuickFIX code base. From memory, I changed most, but not all of these to _WIN32. Just start compiling, and when errors show up see if _MSC_VER is involved, and if it makes sense, change it to _WIN32. Note that the first include file in the windows section is: #include <Winsock2.h> This reminds me of something. Not when you compile and "ar"-ing the static QuickFIX library, but when you link your application to that library, you will need to specify some libraries in the link command, Winsock2.h is for the windows socket implementation that resides in a library that you will have to link to. At least with mingw-w64, you do this by specifying -lws2_32 at the end of the link command. More completely, I had to specify the following libraries: -lxml2 -lz -liconv -lws2_32 This is because (as mentioned in my earlier posting) I told QuickFIX to use "LIBXML" rather than "MSXML", and then found a windows build of libxml. "-lxml2" is for that. "-lz" and "-liconv" are for libraries used by that libxml implementation. > 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 |
In reply to this post by Maz Saeed
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html Hey Frank, Quick question; is this the XML package you used in your GCC project? http://xmlsoft.org/index.html Thanks, --Maz ------- Original Message ------- >From : K. Frank[mailto:[hidden email]] Sent : 3/24/2014 5:33:23 PM To : [hidden email] Cc : Subject : RE: Re: [Quickfix-developers] Non-MSVC build(wasRe:quickfixjmultiplesessions only diff Port) QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html Hi Maz! On Mon, Mar 24, 2014 at 3:46 PM, Maz Saeed <[hidden email]> wrote: > Hey Frank, > Starting to compile with MINGW, getting all kinds of errors -- mostly the include related. For starters, do you know where I could find these header files and associated > libraries? > > #include <sys/socket.h> > #include <sys/ioctl.h> > #include <netinet/in.h> > #include <netinet/tcp.h> > #include <arpa/inet.h> > #include <netdb.h> > #include <fcntl.h> > #include <unistd.h> > #include <pthread.h> > #include <signal.h> First off, which version of QuickFIX are you working with? And which version of which compiler? Are you using a mingw or mingw-w64 version of gcc? If so, which one, i.e., what is the output of "g++ --version"? Also, do you want a 32-bit or 64-bit build? (There were a couple of 64-bit incompatibilities I had to change.) There is an important top-level thing I neglected to mention. To first approximation, you will want to be using the windows-api code paths through the ifdef's. For the most part the windows ifdef-paths are triggered by "#ifdef _MSC_VER". The QuickFIX code is a little imperfect in that _MSC_VER typically indicates that the msvc compiler is being used, while _WIN32 typically indicates that the windows api is being used. These are two different things, but QuickFIX seems to be using _MSC_VER for both purposes. You want to use the windows api (because you will be running on windows rather than on unix or a unix emulator), but you aren't using msvc (and I assume that you are using one of the mingw ports of gcc). So you will typically have _WIN32 defined (e.g., I believe that _WIN32 is normally defined automatically by mingw-w64), but you won't have _MSC_VER defined, because your compiler is not a version of msvc. I thought it was cleaner NOT to simply define _MSC_VER (because it would be incorrect to claim that I was using msvc). So I chose to change _most_ of the occurrences of _MSC_VER in the code to _WIN32. For example, in my copy of Utility.h (I assume that yours is similar, if not identical.), I have the following #include's: #ifdef _MSC_VER // <-- change this to _WIN32 ///////////////////////////////////////////// #include <Winsock2.h> // <-- these are windows-api headers #include <process.h> #include <direct.h> #include <time.h> typedef int socklen_t; ///////////////////////////////////////////// #else ///////////////////////////////////////////// #include <sys/types.h> // <-- these are posix headers #include <sys/socket.h> #include <sys/ioctl.h> #include <sys/time.h> #include <sys/stat.h> #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> #include <netdb.h> #include <fcntl.h> #include <unistd.h> #include <pthread.h> #include <signal.h> #include <errno.h> #include <time.h> #include <stdlib.h> ///////////////////////////////////////////// #endif So if you change _MSC_VER to _WIN32 as indicated above, you will now be including the windows headers rather than the posix headers (that you don't have). There are occurrences of _MSC_VER scattered throughout the QuickFIX code base. From memory, I changed most, but not all of these to _WIN32. Just start compiling, and when errors show up see if _MSC_VER is involved, and if it makes sense, change it to _WIN32. Note that the first include file in the windows section is: #include <Winsock2.h> This reminds me of something. Not when you compile and "ar"-ing the static QuickFIX library, but when you link your application to that library, you will need to specify some libraries in the link command, Winsock2.h is for the windows socket implementation that resides in a library that you will have to link to. At least with mingw-w64, you do this by specifying -lws2_32 at the end of the link command. More completely, I had to specify the following libraries: -lxml2 -lz -liconv -lws2_32 This is because (as mentioned in my earlier posting) I told QuickFIX to use "LIBXML" rather than "MSXML", and then found a windows build of libxml. "-lxml2" is for that. "-lz" and "-liconv" are for libraries used by that libxml implementation. > 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 |
QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html
QuickFIX Support: http://www.quickfixengine.org/services.html Hello Maz! On Tue, Mar 25, 2014 at 3:39 PM, Maz Saeed <[hidden email]> wrote: > Hey Frank, > Quick question; is this the XML package you used in your GCC project? > > http://xmlsoft.org/index.html Yes, I believe it is, although I am not certain. I used a pre-built version of libxml2 that I downloaded (I think) from here: http://www.stats.ox.ac.uk/pub/Rtools/R215x.html http://www.stats.ox.ac.uk/pub/Rtools/goodies/multilib/Old/local215.zip I speculate that http://www.stats.ox.ac.uk/pub/Rtools/goodies/multilib/local300.zip is a newer version, but I haven't looked at it. My copy of local215.zip has both 32-bit and 64-bit versions. I got it specifically to get the 64-bit version, but from what you said about your compiler, you would probably want the 32-bit version. Assuming that you're using the 32-bit mingw windows port of gcc, I would guess that the pre-built 32-bit version in the above download would work for you. (I don't know this for a fact, but c code -- which libxml is -- is reasonably likely to be object-code compatible from one compiler version to another.) The use of libxml is activated in a handful of files by ifdef's keyed off of "HAVE_LIBXML". You'll need to turn on these ifdef code paths one way or another. > Thanks, > --Maz Best 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 |
Free forum by Nabble | Edit this page |