mex c compile using arc4random_uniform gets undefined reference to `arc4random_uniform' collect2.exe: error: ld returned 1 exit status
Ältere Kommentare anzeigen
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 Kommentare
Jan
am 24 Nov. 2019
What is SPIKY? Can you provide a link to this software package? Did you contact the authors already?
ROBERT LENZIE
am 24 Nov. 2019
James Tursa
am 25 Nov. 2019
Can you find the functions arc4random or arc4random_uniform anywhere in your source code?
ROBERT LENZIE
am 1 Dez. 2019
ROBERT LENZIE
am 1 Dez. 2019
ROBERT LENZIE
am 1 Dez. 2019
Antworten (0)
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!