|
[Sponsors] |
May 8, 2005, 23:17 |
UDF - Fortran on Windows system
|
#1 |
Guest
Posts: n/a
|
Dear Fluent users,
I have a UDF that calls an external Fortran subroutine. extern void mff_(); --------------------- The Fortran subroutine is: subroutine mff() --------------------- The user_nt.udf includes the file as: USER_OBJECTS = mff.obj ---------------------- I get the error from the Linker: error LNK2001: unresolved external symbol _mff_ ---------------------- Does anyone know how to solve this problem? Thanks G.P. |
|
May 16, 2005, 02:06 |
Re: UDF - Fortran on Windows system
|
#2 |
Guest
Posts: n/a
|
Probabbly you are getting this error message when you build the program, right? This may be due to following reasons 1) You may ave used underscores(_)anywhere in the program or variable names 2) In your program check for variables which are not declared any where else. i.e by mistake you might have typed some variable names which have neither been assigned any values nor calculated from other variables. Better you should have a complete check on your program.
key:You can check with those variables which have the term "mmf" as a part of its name. Please read below the Fortran help message for the LNK2001 error "When you are porting an application from 16 to 32 bits, LNK2001 can occur. The current 32-bit module-definition (.DEF) file syntax requires that __cdecl, __stdcall, and __fastcall functions be listed in the EXPORTS section without underscores (undecorated). This differs from the 16-bit syntax, where they must be listed with underscores (decorated).Any export listed in the .DEF file and not found will cause LNK2001. This could be because it does not exist, is spelled incorrectly, or uses decorated names (.DEF files do not take decorated names). This error message is followed by fatal error LNK1120." |
|
May 16, 2005, 02:11 |
Re: UDF - Fortran on Windows system
|
#3 |
Guest
Posts: n/a
|
Sorry it is not mmf but "mff" sorry for the mistake
Rajesh |
|
July 5, 2011, 03:33 |
|
#4 |
New Member
Ehsan
Join Date: Jun 2011
Posts: 9
Rep Power: 15 |
Hi Gomer,
I am going to use some FORTRAN files as subroutine in UDF. I have followed the instruction of section 5.4 manual "precompiled object files", but I am getting an error of " the system cannot find the file specified", any idea about that? It may be a basic question but how we can call a subroutine from UDF file? Thanks Ehsan |
|
July 6, 2011, 04:35 |
Header file
|
#5 |
Member
Nikolopoulos Aristeidis
Join Date: Jan 2011
Location: Athens, Greece
Posts: 62
Rep Power: 15 |
Do you have a header file???
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling my Udf | noa | Fluent UDF and Scheme Programming | 8 | November 7, 2018 21:08 |
Comparison between C/C++ and Fortran? | rick | Main CFD Forum | 45 | September 6, 2011 01:52 |
Windows 7 related error while building UDF? | sega | FLUENT | 0 | February 25, 2010 08:12 |
help: udf compiling problem on 64 bit windows XP | Hsieh | FLUENT | 2 | September 10, 2009 05:51 |
Linux to Windows (dual boot system) | Alex | Main CFD Forum | 9 | May 3, 2007 04:36 |