CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   UDF Compilation Error for Fluent 12.1 (http://www.cfd-online.com/Forums/fluent-udf/89546-udf-compilation-error-fluent-12-1-a.html)

carteblanche June 15, 2011 22:36

UDF Compilation Error for Fluent 12.1
 
Hi

I am trying to compile a UDF for CG motion using fluent 12.1. When I build the library file and try to load it, it shows me the error open_udf_library:system cannot find the file specified. I searched a lot regarding this issue and found out that this error is Visual Studio related. I have Visual Studio 2010 Ultimate installed and tried starting fluent from the command prompt by visual studio, but it still gives me the same error. I have also tried all the solutions previously mentioned in this forum, but that was for Fluent 6.3 and none of those works for 12.1. Is this some problem with the environment variables? Can someone help me regarding this?

thanks in advance
CB

Amir June 16, 2011 03:26

Hi,
ensure you have linked FLUENT with VC++ by setting its environment, for checking that, it's better to compile and load another simple UDF.

imankhozeymeh September 24, 2011 05:08

hello
I have the same problem, but how can I link fluent with VC++?
thanks

Amir September 24, 2011 07:41

Quote:

Originally Posted by imankhozeymeh (Post 325444)
hello
I have the same problem, but how can I link fluent with VC++?
thanks

http://www.cfd-online.com/Forums/blo...fluent-vc.html

imankhozeymeh September 24, 2011 08:46

Hi Amir

I copied the variables to the FLUENT folder..(not sure if you meant this)
I am using Visual studio 10 prof. and FLUENT 12.1.4
when i start Fluent , at UDF compiler setup I link it to Microsoft Visual Studio 10.0\VC\vcvarsall.bat
I did everything where suggest in the forum, but steel this error comes out.

Error: open_udf_library: The system cannot find the file specified.
Error Object: #f

Can you help me with this, thank you

Amir September 24, 2011 11:39

Hi,
Quote:

Originally Posted by imankhozeymeh (Post 325463)
I copied the variables to the FLUENT folder..(not sure if you meant this)

you need to have FLUENT in your system path. execute "setenv.exe" which is in your FLUENT installation folder.
Quote:

Originally Posted by imankhozeymeh (Post 325463)
I am using Visual studio 10 prof. and FLUENT 12.1.4
when i start Fluent , at UDF compiler setup I link it to Microsoft Visual Studio 10.0\VC\vcvarsall.bat
I did everything where suggest in the forum, but steel this error comes out.

Error: open_udf_library: The system cannot find the file specified.
Error Object: #f

Ensure your UDF file name doesn't include any spaces.
If you cannot handle this instruction, there is another way but it's not permanent; First execute "setenv.exe" and then load FLUENT from VC++ command prompt.

Bests,

Behnam Ghadimi October 3, 2011 05:45

Quote:

Originally Posted by Amir (Post 325470)
Hi,

you need to have FLUENT in your system path. execute "setenv.exe" which is in your FLUENT installation folder.

Ensure your UDF file name doesn't include any spaces.
If you cannot handle this instruction, there is another way but it's not permanent; First execute "setenv.exe" and then load FLUENT from VC++ command prompt.

Bests,

thanks a lot Amir,
i do what you said, it is work.

lei November 4, 2011 16:23

Thanks Amir for your discussions.
I had the same problem, had just solved it using the method mentioned by Amir. I also would like to add some comments on the environment settings, because it also depends on the operating system you use (32/64 bit windows). So, if you are using win64, the path should be in the form of "Program Files (x86)...". For example, I use winXP64/Visual Studio 10/Fluent 12.1, and the variables in "start>My computer>Properties>Advanced>Environment Variables>System variables" are set to be:

INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include;

LIB =C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64

Path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;

Lei


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