How to compile with Visual Studio 2010 64-bit?
I tried your templates and it works for 32-bit builds, but with 64-bit builds it gives me the following errors:
1>CHash.obj : error LNK2001: unresolved external symbol ttmath_sbb_x64
1>CHash.obj : error LNK2001: unresolved external symbol ttmath_rcl_x64
1>CHash.obj : error LNK2001: unresolved external symbol ttmath_rcl2_x64
What can I do to get it working?
Visual Studio 64-bit doesn't support inline asm code and we have moved some functions to ttmathuint_x86_64_msvc.asm, so you can either:
1. compile ttmathuint_x86_64_msvc.asm in this way:
ml64.exe /c ttmathuint_x86_64_msvc.asm
and add ttmathuint_x86_64_msvc.o to your project,
2. or don't use asm at all by defining:
#define TTMATH_NOASM 1
before including "ttmath.h"
Aha, ok. So, I guess it's best to compile the 32-bit with assembly, and the 64-bit without?
Do you have any indication what the performance penalty is for the version without assembly?
No, it was only a hint, both asm versions work fine.
The speed of the asm version is about two times faster than the noasm version.