CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Help for udf compile error (http://www.cfd-online.com/Forums/fluent/32276-help-udf-compile-error.html)

richard October 7, 2003 04:51

Help for udf compile error
 
The following two cases are different just because fluent runs on two different machines. Would you kind enough to tell me what makes this different and how can I make the wrongly-run machine work fine?

Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.

D:\Documents and Settings\zxd>cd my*

D:\Documents and Settings\zxd\My Documents>cd udf

D:\Documents and Settings\zxd\My Documents\udf>cd udflib 系统找不到指定捣径。

D:\Documents and Settings\zxd\My Documents\udf>cd ntx86 系统找不到指定捣径。

D:\Documents and Settings\zxd\My Documents\udf>cd libudf

D:\Documents and Settings\zxd\My Documents\udf\libudf>cd ntx86

D:\Documents and Settings\zxd\My Documents\udf\libudf\ntx86>cd 3d

D:\Documents and Settings\zxd\My Documents\udf\libudf\ntx86\3d>nmake clean

Microsoft (R) Program Maintenance Utility Version 1.60.5270 Copyright (c) Microsoft Corp 1988-1995. All rights reserved.

D:\Documents and Settings\zxd\My Documents\udf\libudf\ntx86\3d>nmake

Microsoft (R) Program Maintenance Utility Version 1.60.5270 Copyright (c) Microsoft Corp 1988-1995. All rights reserved.

cl /c /Za /DUDF_EXPORTING -Ie:\fluent.inc\fluent6.1\ntx86\3d -Ie:\fluen t.inc\fluent6.1\src -Ie:\fluent.inc\fluent6.1\cortex\src -Ie:\fluent.inc\fluen t6.1\client\src -Ie:\fluent.inc\fluent6.1\tgrid\src -Ie:\fluent.inc\fluent6.1\ multiport\src ..\..\src\shaft_14rngke34100.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

shaft_14rngke34100.c # Generating udf_names.c because of makefile shaft_14rngke34100.obj

cl /c /Za /DUDF_EXPORTING -Ie:\fluent.inc\fluent6.1\ntx86\3d -Ie:\fluen t.inc\fluent6.1\src -Ie:\fluent.inc\fluent6.1\cortex\src -Ie:\fluent.inc\fluen t6.1\client\src -Ie:\fluent.inc\fluent6.1\tgrid\src -Ie:\fluent.inc\fluent6.1\ multiport\src udf_names.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj shaft_14rngke 34100.obj

link /Libpath:e:\fluent.inc\fluent6.1\ntx86\3d /dll /debug /out:libudf .dll udf_names.obj shaft_14rngke34100.obj fl6118s.lib Microsoft (R) 32-Bit Library Manager Version 3.00.5270 Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

LINK : fatal error LNK1181: cannot open input file "fl6118s.lib" NMAKE : fatal error U1077: 'link' : return code '0x4a' Stop.

D:\Documents and Settings\zxd\My Documents\udf\libudf\ntx86\3d>

Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp.

C:\Documents and Settings\MZH>E:

E:\>cd data

E:\Data>cd result

E:\Data\Result>cd libudf

E:\Data\Result\libudf>cd ntx86

E:\Data\Result\libudf\ntx86>cd 3d

E:\Data\Result\libudf\ntx86\3d>nmake clean

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

E:\Data\Result\libudf\ntx86\3d>nmake

Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cl /c /Za /DUDF_EXPORTING -Ic:\fluent.inc\fluent6.1\ntx86\3d -Ic:\fluen t.inc\fluent6.1\src -Ic:\fluent.inc\fluent6.1\cortex\src -Ic:\fluent.inc\fluen t6.1\client\src -Ic:\fluent.inc\fluent6.1\tgrid\src -Ic:\fluent.inc\fluent6.1\ multiport\src ..\..\src\shaft_14rngke34100.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

shaft_14rngke34100.c # Generating udf_names.c because of makefile shaft_14rngke34100.obj

cl /c /Za /DUDF_EXPORTING -Ic:\fluent.inc\fluent6.1\ntx86\3d -Ic:\fluen t.inc\fluent6.1\src -Ic:\fluent.inc\fluent6.1\cortex\src -Ic:\fluent.inc\fluen t6.1\client\src -Ic:\fluent.inc\fluent6.1\tgrid\src -Ic:\fluent.inc\fluent6.1\ multiport\src udf_names.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

udf_names.c # Linking libudf.dll because of makefile user_nt.udf udf_names.obj shaft_14rngke 34100.obj

link /Libpath:c:\fluent.inc\fluent6.1\ntx86\3d /dll /debug /out:libudf .dll udf_names.obj shaft_14rngke34100.obj fl6118s.lib Microsoft (R) Incremental Linker Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Creating library libudf.lib and object libudf.exp

E:\Data\Result\libudf\ntx86\3d>

E:\Data\Result\libudf\ntx86\3d>


ap October 7, 2003 15:24

Re: Help for udf compile error
 
From the line:

LINK : fatal error LNK1181: cannot open input file "fl6118s.lib" NMAKE : fatal error U1077: 'link' : return code '0x4a' Stop.

I'd think the linker doesn't know where is the file "fl6118s.lib", or maybe it isn't on the hard disk.

Hi :)

ap

Pat October 9, 2003 16:03

Re: Help for udf compile error
 
Try these steps to compile a udf in fluent:

I believe you are using the Microsoft visual c++ compiler, try running vcvars32.bat in a command window (this will set all the environment variables up).

Next compile the udf source file in fluent.

Next run nmake in the newly created folder: ..\libudf\ntx86\2d\

Then load(build) the udf in fluent.

These steps should allow you to compile and load the udf in Fluent.

-Pat

richard October 13, 2003 00:13

Re: Help for udf compile error
 
I have solved the problem.It is caused by the difference of the versions of compiler and linker. Thanks for all of you and your suggestions.


All times are GMT -4. The time now is 03:23.