CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF link fortran source (https://www.cfd-online.com/Forums/fluent-udf/112893-udf-link-fortran-source.html)

yorelchr February 7, 2013 03:44

UDF link fortran source
 
Hi everyone,

Do anyone know how to compile a UDF calling a fortran source? I have tried to follow the User guide for UDF but I think my problem is coming from the duo "Microsoft Visual Studio 10.0" and "Compaq Visual Fortran6". There must be some kind of problem between the libraries. I've tried to look for a solution on the net, but it's very confusing to me, explanations are for "specialists" and I'm not..
I have the following error message when launching nmake in the MVS10.0 command terminal :
Quote:

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

# Generating ud_io1.h
resolve.exe -udf ..\..\src\rate_driver.c -head_file ud_io1.h
cl /c /Za /DUDF_EXPORTING /DUDF_NT -I. -I"c:\programmi\ansys inc\v130\f
luent"\fluent13.0.0\ntx86\2ddp -I"c:\programmi\ansys inc\v130\fluent"\fluent13.
0.0\src -I"c:\programmi\ansys inc\v130\fluent"\fluent13.0.0\cortex\src -I"c:\p
rogrammi\ansys inc\v130\fluent"\fluent13.0.0\client\src -I"c:\programmi\ansys i
nc\v130\fluent"\fluent13.0.0\tgrid\src -I"c:\programmi\ansys inc\v130\fluent"\f
luent13.0.0\multiport\src ..\..\src\rate_driver.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

rate_driver.c
# Generating udf_names.c because of makefile rate_driver.obj
cl /c /Za /DUDF_EXPORTING /DUDF_NT -I. -I"c:\programmi\ansys inc\v130\f
luent"\fluent13.0.0\ntx86\2ddp -I"c:\programmi\ansys inc\v130\fluent"\fluent13.
0.0\src -I"c:\programmi\ansys inc\v130\fluent"\fluent13.0.0\cortex\src -I"c:\p
rogrammi\ansys inc\v130\fluent"\fluent13.0.0\client\src -I"c:\programmi\ansys i
nc\v130\fluent"\fluent13.0.0\tgrid\src -I"c:\programmi\ansys inc\v130\fluent"\f
luent13.0.0\multiport\src udf_names.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

udf_names.c
# Linking libudf.dll because of makefile user_nt.udf udf_names.obj rate_driver.o
bj
link /Libpath:"c:\programmi\ansys inc\v130\fluent"\fluent13.0.0\ntx86\2
ddp /dll /out:libudf.dll udf_names.obj rate_driver.obj arm9.obj fl1300s.lib
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

libc.lib(dllcrt0.obj) : error LNK2005: __CRT_INIT@12 already defined in LIBCMT.l
ib(dllcrt0.obj)
libc.lib(dllcrt0.obj) : error LNK2005: __DllMainCRTStartup@12 already defined in
LIBCMT.lib(dllcrt0.obj)
libc.lib(dllcrt0.obj) : error LNK2005: __amsg_exit already defined in LIBCMT.lib
(crt0dat.obj)
libc.lib(dllcrt0.obj) : error LNK2005: ___app_type already defined in LIBCMT.lib
(dllcrt0.obj)
libc.lib(dllcrt0.obj) : error LNK2005: ___error_mode already defined in LIBCMT.l
ib(dllcrt0.obj)
libc.lib(dllcrt0.obj) : error LNK2005: __wenvptr already defined in LIBCMT.lib(d
llcrt0.obj)
libc.lib(dllcrt0.obj) : error LNK2005: __aenvptr already defined in LIBCMT.lib(d
llcrt0.obj)
libc.lib(crt0dat.obj) : error LNK2005: __cinit already defined in LIBCMT.lib(crt
0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: _exit already defined in LIBCMT.lib(crt0d
at.obj)
libc.lib(crt0dat.obj) : error LNK2005: __exit already defined in LIBCMT.lib(crt0
dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __cexit already defined in LIBCMT.lib(crt
0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in LIBCMT.lib(cr
t0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __C_Exit_Done already defined in LIBCMT.l
ib(crt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __C_Termination_Done already defined in L
IBCMT.lib(crt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __exitflag already defined in LIBCMT.lib(
crt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __wpgmptr already defined in LIBCMT.lib(c
rt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __pgmptr already defined in LIBCMT.lib(cr
t0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: ___winitenv already defined in LIBCMT.lib
(crt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __wenviron already defined in LIBCMT.lib(
crt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: ___initenv already defined in LIBCMT.lib(
crt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __environ already defined in LIBCMT.lib(c
rt0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: ___wargv already defined in LIBCMT.lib(cr
t0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: ___argv already defined in LIBCMT.lib(crt
0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: ___argc already defined in LIBCMT.lib(crt
0dat.obj)
libc.lib(crt0dat.obj) : error LNK2005: __umaskval already defined in LIBCMT.lib(
crt0dat.obj)
Creating library libudf.lib and object libudf.exp
rate_driver.obj : error LNK2019: unresolved external symbol _chemrate_ reference
d in function _arm9_rate
libudf.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Programmi\Microsoft Visual Studio 10.0\VC\BIN\li
nk.EXE"' : return code '0x460'
Stop.
Thank you for any help.


All times are GMT -4. The time now is 09:00.