bugMCSim simulation sofware - Bugs: bug #49853, x64 Build Using MSVC 2015

 
 

bug #49853: x64 Build Using MSVC 2015

Submitted by:  Alex Hogg <hoglet>
Submitted on:  Thu 15 Dec 2016 03:45:08 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Frederic Yves Bois <fredomatic>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 18 Dec 2016 09:41:03 AM UTC, comment #2:

Done.
I made a more general fix for the aux[] array.

Frederic Yves Bois <fredomatic>
Project AdministratorIn charge of this item.
Thu 15 Dec 2016 09:07:38 PM UTC, comment #1:

thanks for this report

Frederic Yves Bois <fredomatic>
Project AdministratorIn charge of this item.
Thu 15 Dec 2016 03:45:08 PM UTC, original submission:

Windows 7 Ent SP1
CL ver 19.00.24215.1

I have been able to build mod and sim from your source using the Microsoft compiler. I have also built import libraries for GSL v2.3 but not for libSBML. I therefore commented out HAVE_LIBSBML in config.h.

The only issue came with the mh.c file in /sim. There were two problems:

1) MSVC does not support VLAs. The fix to mh.c:1782 is this:

#ifdef _MSC_VER
double aux = _alloca(sizeof(double) nInvTemperatures);
#else
double aux[nInvTemperatures];
#endif // _MSC_VER

2) The code currently assumes 32-bit pointers. When compiling for x64, the compiler emits warnings concerning truncation taking place on lines 1682, 1689, 1695, and 2592. The fix for this is to #include <inttypes.h> then use the PRIxPTR macro and intptr_t typedef.

Please see the attached file for the implementation.

Thanks.

Alex Hogg <hoglet>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #39241:  mh.c added by hoglet (92KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by fredomatic (Posted a comment)
  • -unavailable- added by hoglet (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 18 Dec 2016 09:41:03 AM UTCfredomaticStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 15 Dec 2016 09:08:14 PM UTCfredomaticAssigned toNone=>fredomatic
    Thu 15 Dec 2016 03:45:08 PM UTChogletAttached File-=>Added mh.c, #39241

    Back to the top


    Powered by Savane 3.1-cleanup1