|
[Sponsors] |
January 4, 2013, 15:50 |
Fortran- linking object file with for. files
|
#1 |
Senior Member
MAZI
Join Date: Oct 2009
Posts: 103
Rep Power: 16 |
Hi Dears
I have an object file and 3 .for files. The Object file is a solver. How can i link those 3 files with the object file in Intel Visual FORTRAN? thanks |
|
January 4, 2013, 15:59 |
|
#2 |
Senior Member
Join Date: Nov 2009
Posts: 411
Rep Power: 19 |
1. The compiled file (obj) was generated by Intel Visual Fortran from a Fortran (for) source file ?
2. Any chance to access the source for the solver ? 3. Do you know what is in the solver file ? I mean the subroutines and functions declarations etc ... You could try to do this in a Terminal, something like: ifort file1.for file2.for file3.for solver.obj |
|
January 4, 2013, 16:22 |
|
#3 |
Senior Member
MAZI
Join Date: Oct 2009
Posts: 103
Rep Power: 16 |
1- i dont know
2- no 3- it solves u, v, k, e, p equations. as a matter of fact it is for 2-d turbulent channel flow. i can not understand what you mean by last line that you have written. |
|
January 4, 2013, 16:55 |
|
#4 |
Senior Member
Join Date: Nov 2009
Posts: 411
Rep Power: 19 |
Say that you have 3 Fortran source files (ending in .for) named here file1.for, file2.for, file3.for and an obj file named solver.obj. In order to link the above 4 files into one executable (I'm assuming here that one of your .for files is the main program) you could use Intel Visual Fortran from the command line. The Fortran compiler is named "ifort".
Compiling and linking the above 4 files can be, theoretically, done with this command: ifort file1.for file2.for file3.for solver.obj where, obviously, you will substitute your real file names for file1.for etc ... |
|
January 4, 2013, 17:18 |
|
#5 |
Senior Member
MAZI
Join Date: Oct 2009
Posts: 103
Rep Power: 16 |
error #5082: Syntax error, found IDENTIFIER 'FILE1' when expecting one of: ( % : . = =>
i dealt with above error. where should i put those 4 files, in which directory. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
GPU Linear Solvers for OpenFOAM | gocarts | OpenFOAM Announcements from Other Sources | 37 | August 17, 2022 14:22 |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 06:29 |
[foam-extend.org] Error compiling OpenFOAM-1.6-ext | Canesin | OpenFOAM Installation | 137 | January 20, 2016 14:56 |
[swak4Foam] swak4Foam-groovyBC build problem | zxj160 | OpenFOAM Community Contributions | 18 | July 30, 2013 13:14 |
1.7.x Environment Variables on Linux 10.04 | rasma | OpenFOAM Installation | 9 | July 30, 2010 04:43 |