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/)
-   -   Fluent Warning C4005 (https://www.cfd-online.com/Forums/fluent-udf/15982-fluent-warning-c4005.html)

Jack_sh November 8, 2008 02:23

Fluent Warning C4005
 
Hi there,

I have been trying to compile a UDF to fluent, but each time I receive the following message: ===============================================

Deleted old libudf\ntx86\2ddp\libudf.dll

1 file(s) copied. (system "copy D:\Fluent.Inc\fluent6.3.26\src\makefile_nt.udf libudf\ntx86\2ddp\makefile")

1 file(s) copied. (chdir "libudf")() (chdir "ntx86\2ddp")() test.c d:\fluent.inc\fluent6.3.26\src\machine.h(114) : warning C4005: 'stdout' : macro redefinition

D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(161) : see previous definition of 'stdout' d:\fluent.inc\fluent6.3.26\src\machine.h(115) : warning C4005: 'stderr' : macro redefinition

D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(162) : see previous definition of 'stderr' d:\fluent.inc\fluent6.3.26\src\machine.h(116) : warning C4005: 'stdin' : macro redefinition

D:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(160) : see previous definition of 'stdin' # Generating udf_names.c because of makefile test.obj

Done.

==================================================

I have installed the visual studio and aslo run fluent from visual studio command prompt as per fluent help. And then when I try to load the UDF I receive this message:

================================================== ====

"e:/dynamic_mesh/dynamic mesh 3 (cylindar)"

Opening library "libudf"... Error: open_udf_library: The system cannot find the file specified.

Error Object: ()

================================================== =====

Can anybody help me solving this problem?


Bak_Flow November 10, 2008 15:49

Re: Fluent Warning C4005
 
Hi Jack_sh,

The error you are getting when you attempt loading the udf is clear: it did not compile and link properly.

can you post the udf here?

do you put any extra header files in the udf directory? It seems to have a complaint with:

stdio.h machine.h

Please give some more details and then we can help.

Thanks...........Bak_Flow

jack_sh November 11, 2008 05:20

Re: Fluent Warning C4005
 
Hi Bak_flow,

The UDF I am using is a sample UDF from Fluent UDF Manual as follows:

/************************************************** **********

Simple example of a SDOF property UDF for a moving body

************************************************** ************/

#include "udf.h"

DEFINE_SDOF_PROPERTIES(stage, prop, dt, time, dtime)

{

prop[SDOF_MASS] = 800.0;

prop[SDOF_IXX] = 200.0;

prop[SDOF_IYY] = 100.0;

prop[SDOF_IZZ] = 100.0;

printf ("\nstage: updated 6DOF properties");

}

In fact, I am trying to model an object which is moving under the influence of a cross flow. I mean its motion is determined by the forces from flow field (I use dynamic mesh).

I reinstalled Visual Studio and Fluent on the same drive (C:) but there was no difference and I still receive the error message. What do you suggest?

Bak_Flow November 11, 2008 15:37

Re: Fluent Warning C4005
 
Hi Jack_sh,

2 suggestions:

1. Make sure you start with just the .cas and udf.c in a directory ie. let it create the libudf directory from scratch. Sometimes if there is an existing directory and libraries which are inconsistient things can go wrong ie different versions of fluent, 2d vs 2ddp, etc.

2. Try to compile any other udf either from the manual or preferably downloaded from the fluentusers site. This will test if you have problems compiling any udf or just this one?

Let us know how you make out.

Regards,

Bak_Flow

jack_sh November 12, 2008 02:26

Re: Fluent Warning C4005
 
Dear Bak_flow,

I tried both of your suggestions but they didn't work. I still receive the same message.

I think the problem is that fluent doesn't make all the file needed for compiling the udf. It just produce these files: log, makefile, testudf.obj, udf_names.c and user_nt.udf in ntx86\2ddp folder.

The log file includes this text:

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.

'sed' is not recognized as an internal or external command, operable program or batch file. NMAKE : U1077: 'sed' : return code '0x1' Stop.

Do you have any idea what the problem is?


sabbasi_mr November 17, 2009 23:43

Hi jack_sh,
I have exactly the same problem,
all warnings and .log file are same as yours.
did you solved your problem?/

happyqj June 30, 2010 11:43

Quote:

Originally Posted by sabbasi_mr (Post 236703)
Hi jack_sh,
I have exactly the same problem,
all warnings and .log file are same as yours.
did you solved your problem?/

I got a similar problem, can anybody provide some suggestions?

G. Malvault May 11, 2013 13:30

'sed' program
 
Dear everybody,

This topic is quite old, but I've find a solution : 'sed' is used by the makefile :

"# This makefile uses the public domain program 'sed', make sure
# sed is in your executable path.
"

This program was missing on my computer, you can find it here :
http://sourceforge.net/projects/gnuw...p.exe/download
Just install it, and retry to run nmake.

Best regards,
G. Malvault

sabbasi_mr December 31, 2019 09:00

Thank you very much.


All times are GMT -4. The time now is 02:01.