CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   nmake issue with Windows (https://www.cfd-online.com/Forums/fluent/72847-nmake-issue-windows.html)

sega February 19, 2010 08:54

nmake issue with Windows
 
Hello World.

Sorry to bother you with this known problem.
I know it was discussed before, but in any case I could not find a solution suitable for me.

So as the topic reveals the 'nmake' can't be found on my Windows System.
I made a full installtion of Visual Studio 2010 RC - not out of fun, but because I work with this version and don't want to get back to Version 2008.

I hope version 10 of the Visual Studio may also be able to solve this problem.
I'm sure this information is crucial: I'm using a 64bit Windows 7 operating system.

Any ideas?

Sebastian

usman naseer February 20, 2010 01:34

hi sega,,
The solution of this problem is very simple.If you have installed visual studio and FLuent at default location,add the following lines in the "path"
of environmental variables.

C:\Program Files\visual studio(ur version)....\common\tools;C:\Program Files\visual studio\common\tools\WinNT;C:\Program Files\visual studio\common\MSDEV98\Bin;C:\Program Files\visual studio\VC98\Bin;C:\Fluent.inc\ntbin\ntx86


The best way to add this into the path of environmental variables is to go into that location and copy the adress and paste it in environmental variable panel.

And then open the command prompt window and launch the Fluent from your working directory.There would't be any more problem of "nmeke".
Regards

sega February 20, 2010 04:04

Thank you for your quick reply.
But where do I set these environmental pathes?

And what is the "command prompt window"?
I have read something about this in context with Visual Studio.
Or does it it mean the Windows command line?

sega February 21, 2010 17:50

Quote:

Originally Posted by usman naseer (Post 246673)
C:\Program Files\visual studio(ur version)....\common\tools;C:\Program Files\visual studio\common\tools\WinNT;C:\Program Files\visual studio\common\MSDEV98\Bin;C:\Program Files\visual studio\VC98\Bin;C:\Fluent.inc\ntbin\ntx86

Looks like these Pathes (as long as they exist for Visual Studio 10) are set in my Windows 7 system variables.

I haven't done anything with FLUENT.
The problem still exists.

usman naseer February 21, 2010 22:50

well sega,,
Right click on my computer > properties > advanced > on the bottom of this panel ,you will find "environmental variables". Many variables would be there in this panel.Find out "path". Click "edit" and add the lines which i have mentioned above.
If you don't find the "path" in variable list, click "new" and add this variable yourself.
The easy way to edit the path would be to go into that location and copy the adress and then paste it into "path" panel. For eaxample,the first line is
C:\program files\visual studio\common\tools

Go to your c drive,then program file ,visual studio and then click common and then tools.Now copy this adress and paste it into environmental variable path and so on.

For command prompt,go to "All programs" > run. Write " cmd " and press enter. Command window will open.Go to your working directory through this window and launch Fluent.
Hope I have made myself clear.
Regards

sega February 22, 2010 03:21

Yes, you did make yourself clear. Thank you.
Appartently it worked. There are no more problems with nmake.
The building of the UDF runs smoothly.

Now a different problem surfaces: My system can't find the open_udf_library! Is this a related problem, or should I consider moving this to a separate thread?

usman naseer February 22, 2010 08:58

hi sega,,
After "building" up the library successfully,the system should "load" the library also,,untill there is some compilation error in your udf.
If you write the details of the error you are receiving,then i will be able to say something about it.
Regards

sega February 23, 2010 09:09

Ok. After clicking "Build" if get this output

Code:

Deleted old libudf\win64\3ddp\libudf.dll
        1 Datei(en) kopiert.
(system "copy "C:\PROGRA~1\ANSYSI~1\v120\fluent"\fluent12.0.16\src\makefile_nt.udf libudf\win64\3ddp\makefile")
        1 Datei(en) kopiert.
(chdir "libudf")()
(chdir "win64\3ddp")()
# Generating ud_io1.h
myNewUdf.c
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\config.h(110) : error C2143: syntax error : missing '{' before ':'
c:\program files\ansys inc\v120\fluent\fluent12.0.16\src\config.h(110) : error C2059: syntax error : ':'
C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.16\cortex\src\dll.h(64) : error C2061: syntax error : identifier 'CX_DLL_GetProc'
C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.16\cortex\src\dll.h(64) : error C2059: syntax error : ';'
C:\PROGRA~1\ANSYSI~1\v120\fluent\fluent12.0.16\cortex\src\dll.h(64) : error C2059: syntax error : 'type'

Done.

When clicking on "Load" it is this:

Code:

Opening library "libudf"...
Error: open_udf_library: Das System kann die angegebene Datei nicht finden.
Error: open_udf_library: Das System kann die angegebene Datei nicht finden.

Error Object: #f

Interrupting...
Done.

Which means "the system can't find the file" ...

usman naseer February 23, 2010 14:06

well,
The library can't be "loaded" untill it is "compiled" properly.It is happening in your case.But the strange thing is nothing wrong in your "udf".The inbuilt header files of Fluent has some error in (110 th) line so it is unable to compile your udf successfully.
There can be three possible solution of this problem.

1. Go to program files> Fluent.inc > src. You will find many header files with " .h" name.Find out "config.h" and "dll.h". There is some syntax error in 110 th line of "config.h" and 64th line of "dll.h". Correct these errors according to the "syntax error message"(it means there is some error of sign) which you are getting in Fluent. Unfortunately I can't see the complete error message which you have posted.So I can't tell you the kind of error. If you become successful in correcting these small errors of signs,compile your library again.But always delete the previous library before compiling the library again.

2. Installing the Fluent again may resolve your problem.

3. The versions of "visual studio" and "Fluent" are not compatible if both the previous solutions fail.
I wish you all the best !!

sega February 23, 2010 14:29

Quote:

Originally Posted by usman naseer (Post 247103)
Unfortunately I can't see the complete error message which you have posted.

Here you have it again:
config.h(110):error C2143: syntax error : missing '{' before ':'
config.h(110):error C2059: syntax error : ':'

dll.h(64):error C2061: syntax error : identifier 'CX_DLL_GetProc'
dll.h(64):error C2059: syntax error : ';'
dll.h(64):error C2059: syntax error : 'type'


Quote:

Originally Posted by usman naseer (Post 247103)
There is some syntax error in 110 th line of "config.h" and 64th line of "dll.h".

This are the three lines surrounding 110 of config.h

Code:

109 #if !(RP_2D || RP_3D)
110 Error: both RP_2D and RP_3D are undefined
109 #endif

And this is line 64 of dll.h
Code:

FLUENT_EXPORT CX_DLL_PTF_void CX_DLL_GetProc(void *lib, char *name);
Hope you can help me with this.
Thanks a lot so far!

usman naseer February 24, 2010 03:32

hi sega,,
You are welcome.No need to say thanks.Infact being a student,its a source of learning for me also.
As far as I have understood this problem,nothing is wrong in Header files of Fluent.Actually it is a combatibility issue of Windows 7.Either you get a compatible version of "Visual Studio" or change your windows.I know its hard to compromise on the interesting features of Windows 7,,but for CFD point of view,if you go for XP ,your many problems would be solved like "nmake" and opening the library.Windows 7 is new in market and it would take some time to resolve all its bugs.
So a very simple solution of all these problems is to change the operating system.If I got any solution to this problem on Windows 7,I will let you know.
Regards !!

sega February 25, 2010 07:06

I hope you are kidding me. Changing the operation system?
This can't be an option for such an advanced software like FLUENT.

So, if you find any hint on how to make this work on Windows 7, please let me know.
Meanwhile I will go back to version Visual C++ 2008 and give you a feedback.

sega March 18, 2010 12:59

Ok. I had to include the Visual Studio and FLUENT path into Windows PATH variables. Now everything works fine.

skd May 6, 2010 05:08

Quote:

Originally Posted by sega (Post 250676)
Ok. I had to include the Visual Studio and FLUENT path into Windows PATH variables. Now everything works fine.

Heeelp...
I'm also trying to install Fluent 12.1 on windows7, 64bit.
If I open fluent through VS cmd I get the same errors as you when I try to load the libary:
config.h, dll.h etc...

If I open fluent from the startmenu, I get another error:
Cannot open include file: stdio.h

How did you solve your problem?
I have tried to include the enviroment variables mentioned above, but still it doesn't work. Which enviroment variables need to be set?
I use VS 2005...should I install 2008 instead?

skd May 6, 2010 06:52

hey again...
I added a enviroment variable called INCLUDE and put the link to all includefiles in this one. Now I don't get the error of: cannot find stdio.h, when I open fluent from the startmenu. The error message is now the same as when I open with cmd for VS, namely the one concerning:
config.h dll.h etc...

Please help me... :)

sega May 6, 2010 15:29

I made a contribution to the Wiki some time ago: http://www.cfd-online.com/Wiki/Fluen...ows_7_64bit.3F

Try it.

skd May 7, 2010 02:44

Hey,
I found out what was wrong...
When you install Visual studio 2005, the x64 comilers and tools are not installed by default. You have to go to language tools -> visual C++ and choose "X64 Compilers and Tools". Then everything works fine :)

pacheo June 8, 2010 12:23

Quote:

Originally Posted by sega (Post 257852)
I made a contribution to the Wiki some time ago: http://www.cfd-online.com/Wiki/Fluen...ows_7_64bit.3F

Try it.

hi sega!

I have the same problems as yours. Here are the basic information of my platform.

Win7 ultimate(x64), visual studio 2010 ultimate, ansys 12.1(x64)

I've followed your suggestion from wiki website. But I still met with the difficulties as listed:
----------------------------------------------------------------------
d:\ansys inc\v121\fluent\fluent12.1.2\src\config.h(110) : error C2143: syntax error : missing '{' before ':'
d:\ansys inc\v121\fluent\fluent12.1.2\src\config.h(110) : error C2059: syntax error : ':'
D:\ANSYSI~1\v121\fluent\fluent12.1.2\cortex\src\dl l.h(68) : error C2061: syntax error : identifier 'CX_DLL_GetProc'
D:\ANSYSI~1\v121\fluent\fluent12.1.2\cortex\src\dl l.h(68) : error C2059: syntax error : ';'
D:\ANSYSI~1\v121\fluent\fluent12.1.2\cortex\src\dl l.h(68) : error C2059: syntax error : 'type'
-----------------------------------------------------------------------

Here are my enviroment parameters:

Include
D:\Program Files\Microsoft Visual Studio 10.0\VC\include

lib
D:\Program Files\Microsoft Visual Studio 10.0\VC\lib

path
D:\Program Files\Microsoft Visual Studio 10.0\VC\bin;
D:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools;
D:\ANSYS Inc\v121\fluent\ntbin\win64
------------------------------------------------------------

Could u give me a hand on this udf compile thing?

Thank you in advance!

sega June 12, 2010 06:37

Did you start FLUENT from the SDK command line?

pacheo June 16, 2010 01:16

Quote:

Originally Posted by sega (Post 262732)
Did you start FLUENT from the SDK command line?

yup, but when i start SDK command line, the window showed the information as following in yellow characters:

x64 compilers are not currently installed
Please go to add/remove programs to update your installation.

but i've already installed the x64 compiler and the sdk 7.1 is the new version for win7 x64.

Fortunately, I got the the problem solved. I just copied the udf.h from fluent12.1 to the working directory to replace the old one from fluent6.3 and started a new case file. It worked!

Thank you for your kindly reply!


All times are GMT -4. The time now is 18:58.