Error: "This application failed to start because libufun.dll was not found."

5.7k Views Asked by At

OS: Windows XP

IDE: Visual Studio 2005

Language: C/C++

Coding for: Unigraphics NX (which is a type of CAD software), specifically an external automation in Open C (but this may not be important)

I'm trying to code an external program for NXOpen - which, for those unfamiliar with it, means it runs on Windows, instead of within NX (which would be an internal program). I decided to comment out all the interesting stuff and just test it using some printf statements to make sure that everything was properly linked.

Apparently, it's a good thing I did, because when I try to run the .exe that was generated, I get the error "This application failed to start because libufun.dll was not found. Re-installing the application may fix this problem." libufun.dll belongs to the UG library.

From what I've read so far, the file may be corrupted. However, it may also simply have some strange linking problem (what with all these strange libraries), and I want to look for issues of that sort before trying to find a new copy of the file. I've already checked that the Linker->General->Additional Library Dependencies path is correct, and that the related system variable hasn't changed. All is well, there.

Is there anything else I should check or do to make this work?

Thanks!

2

There are 2 best solutions below

6
On BEST ANSWER

1)find libufun.dll, put it in same folder with your .exe
2)My Computer - Properties - Advanced - Environment Variables, edit PATH variable, add directory containing libufun.dll to PATH
3) set PATH with directory containing libufun.dll inside IDE
If you linked dynamically(as you did), this dll should be in PATH or near (in same folder) your exe everytime you run this application.
If you dont like this, you should link statically with appropriate .lib files, this way you wont need dll.

0
On

There is a environment variable UGII_ROOT_DIR. Find this variable and add it to the PATH variable to get the project working.

PATH=%PATH%;%UGII_ROOT_DIR%;

The main environment variables that drive Unigraphics NX are UGII_BASE_DIR and UGII_ROOT_DIR. UGII_BASE_DIR is the folder in which NX has been installed. UGII_ROOT_DIR is the folder where all the executables are located. When NX is installed these two environment variables are created.