Hi,i usually compile everything in the ftn95 comand prompt with: ftn95 filename/lgo however now i want to put a subroutine in the module and the module in the separate file. there are no errors but compilation is abandoned,i have to link somehow these 2 files together,what should i do?thanks
compiling modules as separate files
You have to compile one file at a time (in the correct dependency order) then use SLINK to do the link (order of object files doesn't matter).
ftn95 module_file.f90 ftn95 program_file.f90 slink -out:program.exe module_file.obj program_file.obj
This generalises for more than 2 files in the obvious way.
This isn't documented very well in the Help file. There is no discussion about SLINK. If you type SLINK -help you will get a list of options.
Things are a little different if you are building for .NET as you need a different linker.
that has really worked out,thanks alot
help is sometimes difficult to understand,luckily there is support
Many users find it easier to create a project using Plato or Visual Studio.