I'm trying to compile the ISAAC algorithm (standard.h, rand.h, rand.c) into a static library on Linux.
Specifically, Iḿ using gcc to compile rand.c to rand.o, after which I use ar to create a static library.
Code: Select all
gcc -c rand.c
ar rvs rand.a rand.o
until I try calling randinit on a CTX. This shouldn't be a problem, the exact same code compiled on Windows
functions as expected on both x64 and x86 systems. I'm having this problem on Linux Mint 17 x64 with Cinnamon.
The simplest PB test file I use which causes the compiler to report an unexpected exit after a second or two:
Code: Select all
#RANDSIZL = 8
#RANDSIZ = (1 << #RANDSIZL)
Structure randctx Align #PB_Structure_AlignC
randcnt.l
randrsl.l[#RANDSIZ]
randmem.l[#RANDSIZ]
randa.l
randb.l
randc.l
EndStructure
ImportC "rand.a"
isaac.i (*ctx.randctx)
randinit.i (*ctx.randctx, flag.i = 0)
EndImport
Define test.randctx
randinit(@test, #False)