C-program failed to compile

Hi all!

I am trying to run this c-script on a cuda-enabled gpu as it specifies: https://github.com/HPSCIL/cuSTARFM. (I did not write the program and kept everything the same, with the exception of changing the the input file so it calls files in the right directory)

However, it fails to compile giving me the errors in the file attached. I am able to get a --version for gcc, gdal, cuda and nvcc- the requirements. Do you think this is an issue with the script itself? or rather that it is occurring because some of the packages required for it to run were not properly installed/set-up?

Thanks!

cuSTARFM-errors-run1.log (5.3 KB)

Hi cmrswin

It seems that your compiler (C/C++ compiler) is taking the wrong standard. The function with problems are sscanf_s, fscanf_s, and others, which are part of the “stdio.h”. However, this instruction comes from C11 and it is not available in C99 (reference: here). You may try to pass the flag to support the standard or edit the code removing the “_s” suffix if the code is just a sample.

Apparently is a matter of configuration and the script seems to be OK, with a lot of warnings, btw.

Regards,
Leon.

1 Like

Thank you for answering! I will try your suggestions.

1 Like