Thank you very much for your advice. By deleting all the null characters and manually adding the path to the IOAPI library, I managed to compile the jproc program. But whenever I run the following command:
./bldit.jproc pgi
The null characters show up again in the Makefile. I would like to ask how to avoid those characters from showing up when running the bldit.jproc file?
I am not 100% sure, but I think the problem is in the way you edited the build script to create the configuration file that is used by bldmake to generate the Makefile. I am not sure that “netcdff” is recognized by the utility. Instead, you might need to combine multiple libraries the way the release version of the script does:
echo "libraries $quote$LIBS$quote;" >> $Cfile
where LIBS is defined as set LIBS="$LIB1 $LIB2 $LIB3" as appropriate.
This is not something you will need to compile too often, so once you have gotten JPROC to compile I would just declare victory and use it rather than worry about the “right” way to modify the bldit script.