#3975 Missing include file when using tclTomMath.h

obsolete: 8.5.2
closed-fixed
Don Porter
9
2009-10-06
2008-04-13
Andy
No

When compiling an extension that uses bignum objects it is necessary to include "tclTomMath.h" to obtain the prototypes for the bignum functions. "tclTomMath.h" also includes "tommath_class.h" which is not part of the installed include files. "tommath_class.h" is located in the "libtommath" directory. Therefore it is necessary to have sources around in order to build extensions that use bignums.

Discussion

    • labels: 105687 --> 56. LibTomMath
    • assigned_to: nobody --> kennykb
     
  • Andy Goth
    Andy Goth
    2008-12-16

    I have also run into this problem with Tcl 8.6a3. I was able to work around it simply by creating an empty file named tommath_class.h in my source tree and adding its directory to the -I include path. However, this is a very ugly hack. tclTomMath.h should be fixed to only include this file when building the Tcl library or to never include it at all, depending on whether or not it serves any purpose at build time. It isn't useful when simply using the library.

     
  • Don Porter
    Don Porter
    2009-09-30

     
    Attachments
  • Don Porter
    Don Porter
    2009-09-30

    Patch uploaded for comments.

    See also http://wiki.tcl.tk/24497 .

     
  • Don Porter
    Don Porter
    2009-09-30

    That patch is against the HEAD. Should adapt
    easily to the 8.5 branch.

     
  • Don Porter
    Don Porter
    2009-10-01

    • priority: 5 --> 9
    • assigned_to: kennykb --> dgp
     
  • Don Porter
    Don Porter
    2009-10-06

    Fixed for 8.5.8 and 8.6b2.

     
  • Don Porter
    Don Porter
    2009-10-06

    • status: open --> closed-fixed