mex c compile using arc4random_uniform gets undefined reference to `arc4random_uniform' collect2.exe: error: ld returned 1 exit status
Mostrar comentarios más antiguos
I am trying to install SPIKY on Matlab 2019b which has as part of the SPIKY install the mex script:
mex -Dchar16_t=uint16_T SPIKE_order_surro_MEX.c
The program
SPIKE_order_surro_MEX.c
contains the following:
while (sc<num_swaps) {
brk=0;
coin=arc4random_uniform(num_coins)+1; // get random integer
The compile generates the following error:
Building with 'MinGW64 Compiler (C)'
.
Error using mex
C:\Users\RobLe\AppData\Local\Temp\mex_57607468677249_25364\SPIKE_order_surro_MEX.obj:SPIKE_order_surro_MEX.c:(.text+0x1d0): undefined reference to
`arc4random_uniform'
collect2.exe: error: ld returned 1 exit status
Error in SPIKY_compile_MEX (line 27)
mex -Dchar16_t=uint16_T SPIKE_order_surro_MEX.c
Any idea how I fix this ?
Thanks
6 comentarios
Jan
el 24 de Nov. de 2019
What is SPIKY? Can you provide a link to this software package? Did you contact the authors already?
ROBERT LENZIE
el 24 de Nov. de 2019
James Tursa
el 25 de Nov. de 2019
Can you find the functions arc4random or arc4random_uniform anywhere in your source code?
ROBERT LENZIE
el 1 de Dic. de 2019
ROBERT LENZIE
el 1 de Dic. de 2019
ROBERT LENZIE
el 1 de Dic. de 2019
Respuestas (0)
Categorías
Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!