Topic: Using external module

Hi,

I have m_io.mod which I downloaded using sfpm.

   use stdlib_kinds
   use m_io, only: basename, dirname

IDIR=-IC:/Users/truep/AppData/Local/sfpm/32/include -IC:/FORTRAN/PROJECTS/TPPOST/modules

yet I get error:

C:\FORTRAN\PROJECTS\TPPOST/./src/tppost.f90:221: undefined reference to `__m_io_MOD_dirname'

Any idea why it's not linking?  I'm also using stdlib and no issues there.

I've had to add the m_io.f90 source to my project and compile it to my ./modules folder to compile/build.

Trying to use libraries as this project is getting huge...

Thanks,
Bryan

Re: Using external module

Bryan,

What are your Compiler Flags (in Project Options) set to?  You need to make sure

-lm_io

is included in the Linker flags box.  The reference to __m_io_MOD_dirname does appear to be in the library.

Jeff Armstrong
Approximatrix, LLC

Re: Using external module

Thank you Jeff.  That worked for all the various libraries/modules I had been having trouble with.  I may be confused.  I had expected that having the "default include/module/add--on/library directories) added in the "File Locations" tab was all I needed to do having the package manager, since stdlib has always worked without having to compile the source.

Re: Using external module

Apologies Jeff.  It's all there in your excellent documentation clear as day.  Bad habit but in Windows I tend to take things for granted.  I'm now reading your manual (at least the section on using the SF IDE) in its entirety as I should have months ago.

Re: Using external module

what's the title of that manual?

Re: Using external module

I guess technically not a manual, but your documentation under "Help" in the idea in the Windows IDE.  The Help in the Linux version (which I mostly use) is not as complete, probably hard to port it - I know next to nothing about GUI's.  The windows help contents are very thorough.  It is very difficult for my brain to absorb info digitally, so I almost always purchase paper manuals.  I'd purchase yours if you had one.

Re: Using external module

In cases of only a .pdf or other electronic media, I've had good luck downloading to a flash drive, then taking it to an OfficeMax or OfficeDepot store, where they printed and bound it. But that was back in the day when a sheet of copied paper cost less than a nickel.