mex c compile using arc4random_uniform gets undefined reference to `arc4random_uniform' collect2.exe: error: ld returned 1 exit status
이전 댓글 표시
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
Jan
2019년 11월 24일
What is SPIKY? Can you provide a link to this software package? Did you contact the authors already?
ROBERT LENZIE
2019년 11월 24일
James Tursa
2019년 11월 25일
Can you find the functions arc4random or arc4random_uniform anywhere in your source code?
ROBERT LENZIE
2019년 12월 1일
ROBERT LENZIE
2019년 12월 1일
ROBERT LENZIE
2019년 12월 1일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!