Or explicitly give the full path to your compiler to configure. add the path to your compiler to the PATH variable or similar variable in cygwin.
Also make sure that you can link your hello world program against the same libraries used by your modelling program, this last statement could lead you to the 3rd situation. Install the missing libraries if necessary. make sure you can manually compile and run a simple hello world program.
It can also be another situation that I am not aware of. I am not expert of cross-compiling either. cross-compiling problem, I do not know much about cygwin but that can be an issue.See LD_LIBRARY_PATH for linux environment. dynamic libraries problem runtime path to the dynamic libraries not set.autotools can not detect your compiler.missing libraries this can be missing libraries for your project or compiler/system libraries, like libgfortran or similar for g95.This problem is common for beginners with autotools. Hopefully some of this information will be helpful, or at least educational. Gcc-fortran GNU Compiler Collection (Fortran) The complete list hadĬygwin64-gcc-fortran GCC for Cygwin 64bit toolchain (Fortran)` With that answer, I went back to the Complete Cygwin Package List, armed with my trusty Ctrl + F, since I knew there were packages different from what came back from the search. I found a great gfortran answer in this SO answer. When I had a similar problem, I went to the Cygwin package search, but I only got three entries with three versions of netcdf-fortran Here's some helpful info on how I found what to install. The likely extra thing you would need in this case is something like I don't know for sure how this works, especially with the Cygwin man page being slightly different, but it's worth a try. The basic reason for all of that info is this: it is very possible that, in order to link with the gfortran library, you need to have installed a package named something like libgfortran. These days, there might be a more complicated search path involving dynamic library names, etc., but you should get the basic idea from this example. For example, gcc -o myapp myapp.c -lm, ill compile myapp.c, link the resulting object with libm.a, and output an executable called myapp. You can name a library whatever you want, but if you want gcc's -l flag to find the right one, you need to name it the way that link describes. There is a little more detail and a little different result from the answer to a question about the lib prefix on files: (Note that I haven't included some parts of the result that aren't useful and can be fixed by prefixing the command with MANWIDTH=160, cf here.) POSIX compliance and is not recommended.) (The secondĪlternative with the library as a separate argument is only for Search the library named library when linking. Here's why I think this might be the case. The libgfortran5 (or a more recent version, if available when you search) might be necessary. $ cd /path/to/setup_install/setup_x86-64.exe -q -P wget # Note that mine is for the 64-bit version, and that # This is what you used to install Cygwin the first time. # Get to where your setup executable lives. If you don't have apt-cyg yet, follow these instructions from another answer. $ apt-cyg install gcc-fortran libgfortran5 I'm also addressing a possible linkage issue. I suspect it is something with how/where I installed the compilers.īecause the installation from apt-cyg should be helpful in letting the system know where to look for the compilers.
For me, it's more helpful to have executable code to go through the process, so I'm going to put some in.