claymore
claymore copied to clipboard
cmake error with "fopen_s"
Hi there, I have recently encountered a cmake error that: "error: identifier 'fopen_s' is undefined" in the process of compiling gmpm. I didn't quite understand the cause of the error. How can I solve this problem? Thank you so much in advance
And my system info should be as: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, nvidia driver Version: 515.65.01, CUDA Version: 11.7
Might be just an include issue. Try including stdio.h in gmpm.cu. (But you are lucky if that's the only issue, newest version is not tested agains gcc.)
#include <stdio.h>
#ifdef __unix #define fopen_s(pFile,filename,mode) ((*(pFile))=fopen((filename),(mode)))==NULL #endif
Try add these lines.