- #1
avikarto
- 56
- 9
I am having some trouble getting all of my libraries included in my g95 call at the command line (using Windows Powershell). The confusion stems from the purpose and use of the "g95_library_path" variable native to the compiler, and how this enters with the "-L/..." option on the command line. In cmd, you can check
to confirm that the systems knows where your main library path is, which happened at the installation of g95. The extra added libraries, like BLAS and DFFTPACK were built in powershell via "make for windows", so I watched them successfully install.
The issue then is when trying to run my code that uses one of these downloaded libraries. Taking dfftpack as an example (calling the function "cffti" in the main program), my custom command line call looks like this:
then, running "g brem.f95", i produce the following error in powershell:
I am therefore confused as to why my library isn't been seen by my compiler, since I pointed it explicitly to the directory where it lives. Do I need to somehow link the variable "g95_library_path" into my 'g' function? What does that variable even do? Thanks for any help.
Code:
echo %path%
echo %g95_library_path%
The issue then is when trying to run my code that uses one of these downloaded libraries. Taking dfftpack as an example (calling the function "cffti" in the main program), my custom command line call looks like this:
Code:
function g($x) {
g95 -c myModule.f95
g95 $x myModule.o -L/libs/dfftpack
}
then, running "g brem.f95", i produce the following error in powershell:
Code:
C:\Users\Andrew\AppData\Local\Temp/ccWHpUAk.o:brem.f95:(.text+0xcc): undefined reference to `cffti_'