Thanks for your reply, Jeff!This interpretation of "errors" makes sense, as the example code is compiled successfully and gives right results.
However, as what's found earlier this morning, I was suspecting the correct installation of the library itself. The installation note writes:
To obtain the definitions of the NLopt constants in Fortran, your Fortran program/subroutine should include the following line:
The nlopt.f file is installed into the include directory along with the C/C++ header files (by default, this is /usr/local/include ... you may need to include -I/usr/local/include in your Fortran compiler flags if this directory is not in your compiler's standard include path).
When you compile your program you will have to link it to the NLopt library. On Unix, you would normally link with a command something like:
compiler ...source/object files... -lnlopt -lm -o myprogram
where compiler is f77, gfortran, or whatever is appropriate for your machine.
Note: the above example assumes that you have installed the NLopt library in a place where the compiler knows to find it (e.g. in a standard directory like /usr/lib or /usr/local/lib). If you installed somewhere else (e.g. in your home directory if you are not a system administrator), then you will need to use a -L flag to tell the compiler where to find the library. See the installation manual.
Obviously, it's speaking to users who are in Unix system (correct me if I'm wrong). After digesting a little bit with the make file I previously got, I put the nlopt.f and nlopt.h files into
C:\Program Files (x86)\Simply Fortran\mingw-w64\x86_64-w64-mingw32\include
and changed compiler locations to those under (resource compiler location wasn't changed as I didn't find windres.exe in the following folder)
C:\Program Files (x86)\Simply Fortran\mingw-w64\x86_64-w64-mingw32\bin\
while the default is
C:\Program Files (x86)\Simply Fortran\mingw-w64\bin\
Now the punch line question is: if make file "errors" are not true ones, am I installing the library in a correct way from their instructions?