sxmlc icon indicating copy to clipboard operation
sxmlc copied to clipboard

Visual Studio and RAD Studio 32 and 64 bit compilation issues

Open Jeanmilost opened this issue 3 years ago • 1 comments

  • fixed: 64 bit compilation issues
  • fixed: project could not be compiled with Visual Studio 2019
  • fixed: project could not be compiled with Embarcadero RAD Studio XE7

Jeanmilost avatar Jan 15 '22 18:01 Jeanmilost

Hi!

Sorry for being so late, I was reviewing a few things and here is what I did in the latest version (4.5.2):

  • upper-cased true and false. I kept the lower-case as well for compatibility
  • added an MS specific #define to handle sx_strdup

Unfortunately, I couldn't handle the strncpy_s cases easily; but I'll definitely look into it because it's safer. The function seems to be available in standard C but it doesn't show in my Linux. I'll look into that some other time.

Also, I decided not to take into account the RAD-specific setting because it seems the problem comes from the compiler: struct initialization is standard for a long time.

I wanted to merge your first commit but cherry-pick on the second one but I couldn't find a way to do it. If you have a chance to check the new version, you'll have to redo the changes for the strncpy_s and others. If it's something you want to improve in sxmlc, please do so :) but prototypes should be defined in sxmlc.h (with sx_ prefix) and harmonized throughout the code, keeping in mind most people use it in embedded software running Linux :)

Regards, Matthieu

matthieu-labas avatar Sep 02 '22 09:09 matthieu-labas