CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Error while compiling Fortran routine (http://www.cfd-online.com/Forums/cfx/22081-error-while-compiling-fortran-routine.html)

Manoj Kumar January 24, 2006 04:39

Error while compiling Fortran routine
 
Hi Everyone

I am getting following error, while trying to create shared library for the user sub routine, MomentumSource1.F used in one of the Ansys CFX 10 tutorials ...

C:\cfx\test1>cfx5mkext MomentumSource1.F

-----------------------

df -MD -fpp:-m -include:"C:\Program Files\Ansys Inc\CFX\CFX-10.0\include" -object:winnt\\MomentumSource1.o -c MomentumSource1.F

DIGITAL Visual Fortran Optimizing Compiler Version: V5.0

Copyright (c) 1997 Digital Equipment Corp. All rights reserved.

Digital (R) Fortran Preprocessor Version V5.0-007

Copyright (c) Digital Equipment Corp 1993,1997.

** error UNREC: Unrecognized option '-m'.

C:\DOCUME~1\Guest\LOCALS~1\Temp\fpp10.tmp

df -threads -dll:.\winnt\\MomentumSource1.dll

winnt\\MomentumSource1.o C:\Progra m Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib

DIGITAL Visual Fortran Optimizing Compiler Version: V5.0

Copyright (c) 1997 Digital Equipment Corp. All rights reserved.

Microsoft (R) 32-Bit Incremental Linker Version 5.00.7022

Copyright (C) Microsoft Corp 1992-1997. All rights reserved.

/entry:_DllMainCRTStartup@12

/ignore:505

/debugtype:cv

/debug:minimal

/pdb:none

winnt\\MomentumSource1.o

"C:\Program Files\Ansys Inc\CFX\CFX-10.0\lib\winnt\solver-pvm.lib"

dformd.lib

msvcrt.lib

dfconsol.lib

kernel32.lib

/out:.\winnt\\MomentumSource1.dll /dll

LINK : fatal error LNK1181: cannot open input file "dformd.lib"

An error has occurred in cfx5mkext:

df exited with return code 73.

-----------------------------------------------

I went through the older posts but couldn't get much out of them. Can anyone help me out. Thanks in advance.

Manoj

TobiasZ January 24, 2006 05:30

Re: Error while compiling Fortran routine
 
Hi,

I guess you use a windows platform? The manual says that for this case Compaq Visual Fortran 6.5 or later is required and sucessfully tested.

Perhaps your compiler is not suitable for CFX-10. You could also try to use the command " ! system ("cfx5mkext <name_of_routine>.F") == 0 or die; " in CFX-Pre under Tools>CommandEditor. Another reason can also be that spaces are not allowed in the file name.

Hope this helps.

TobiasZ

selvam R.P January 24, 2006 23:59

Re: Error while compiling Fortran routine
 
Hi all,

i am also getting same error while compiling in command line

df -MD -fpp:-m -include:D:\CFX\CFX-10.0\include -object:winnt\\CDvar_Coeff.o -c CDvar_Coeff.F Compaq Visual Fortran Optimizing Compiler Version 6.6 Copyright 2001 Compaq Computer Corp. All rights reserved.

Compaq (R) Fortran Preprocessor Version 6.6-24 Copyright 2001 Compaq Computer Corporation.

CDvar_Coeff.i df -threads -dll:.\winnt\\CDvar_Coeff.dll winnt\\CDvar_Coeff.o D:\CFX\CFX-10.0\l ib\winnt\solver-pvm.lib Compaq Visual Fortran Optimizing Compiler Version 6.6 Copyright 2001 Compaq Computer Corp. All rights reserved.

Microsoft (R) Incremental Linker Version 6.00.8447 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/entry:_DllMainCRTStartup@12 /ignore:505 /debugtype:cv /debug:minimal /pdb:none winnt\\CDvar_Coeff.o D:\CFX\CFX-10.0\lib\winnt\solver-pvm.lib dformd.lib msvcrt.lib dfconsol.lib dfport.lib kernel32.lib /out:.\winnt\\CDvar_Coeff.dll /dll Creating library .\winnt\\CDvar_Coeff.lib and object .\winnt\\CDvar_Coeff.exp

CDvar_Coeff.o : error LNK2001: unresolved external symbol _CDVAR_COEFF_CORE@52 .\winnt\\CDvar_Coeff.dll : fatal error LNK1120: 1 unresolved externals An error has occurred in cfx5mkext:

df exited with return code 96.

thanks with regards

TobiasZ January 25, 2006 05:08

Re: Error while compiling Fortran routine
 
Hi Selvam,

I am not an expert, but I think your case is different. You have an error in your routine. During the compilation the compiler proofs, if your routine is correct and stops when an error occurs. It seems that you didn't define your external variable.

Regards

TobaisZ


All times are GMT -4. The time now is 06:04.