mhoopmann / mstoolkit

Automatically exported from code.google.com/p/mstoolkit
27 stars 10 forks source link

Compiling with MSVC 2015 community #8

Closed ozohanics closed 8 years ago

ozohanics commented 8 years ago

Hi!

I managed to compile with MSVC 2015, but there were some changes that were needed. I hope this information will be useful to other users. Would it be possible to incorporate these changes in future versions, so no manual tweaking be necessary. Thank you!

Xmlparse.cpp Line 10

if _MSC_VER >= 1900

#define HAVE_MEMMOVE

endif

Line 1491 //Handle XML_Status and XML_Error else { switch (ps_parsing) { case XML_SUSPENDED: result =(XML_Error) XML_STATUS_SUSPENDED; break; case XML_INITIALIZED: case XML_PARSING: result = (XML_Error) XML_STATUS_OK; if (isFinal) { ps_parsing = XML_FINISHED; return (XML_Status) result;

Line 1536 return (XML_Status) result;

expat.h

Line 21 Commented out //extern "C" { Line 1011 Commented out //}

XMLTOK.h Line 9 Commented out //extern "C" { Line 313 Commented out

Expat_external.h Line 62 Commented out

define XMLIMPORT

//__declspec(dllimport)

endif

mhoopmann commented 8 years ago

It seems the expat code is due for a major upgrade. These fixes may be obsolete, and new ones may be necessary. If you see any issues, please share them. Sorry for any inconvenience.

mhoopmann commented 8 years ago

I updated expat and it works much better without the need to modify the code. It was merely out of date for modern dev environments.

I tested the new version with MSVC 2015 and it works with the x86 build without any issues. For x64, I had to define WIN32 to trigger windows-specific content.