mex c compile using arc4random_uniform gets undefined reference to `arc4random_uniform' collect2.exe: error: ld returned 1 exit status
Afficher commentaires plus anciens
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 commentaires
Jan
le 24 Nov 2019
What is SPIKY? Can you provide a link to this software package? Did you contact the authors already?
ROBERT LENZIE
le 24 Nov 2019
James Tursa
le 25 Nov 2019
Can you find the functions arc4random or arc4random_uniform anywhere in your source code?
ROBERT LENZIE
le 1 Déc 2019
ROBERT LENZIE
le 1 Déc 2019
ROBERT LENZIE
le 1 Déc 2019
Réponses (0)
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!