LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable does not see a shared file.

I have a folder that contains a C file, a H file and the UIR. In several folders I have projects that use these files. When running as a project there are no problems. When I create an Executable it does not see the UIR file and will not run. If I copy the UIR file and put it in the same directory as the Exe there are no problems. I want to keep this file in a seperate folder so all the projects can use it. WHAT GIVES??? thanks
0 Kudos
Message 1 of 2
(2,896 Views)
The location of the UIR file is given when you load it:
rxGraph = LoadPanel (0, "rx_graph.uir", RX_GRAPH);

I assume you can supply a relative path, becoming:
rxGraph = LoadPanel (0, "../some_dir/other_project/rx_graph.uir", RX_GRAPH);

I don't know why it works in project mode, I don't have ehough information.

Why don't you use the UIR to Code converter, and build it into the application (ok, the .exe is a little bigger but...).
This would mean that you don't need to distribute the .uir file.

So the above just becomes:
rxGraph = BuildRX_GRAPH(0);
everything else remains the same. (You have to include the .h and build the .c for the UIR code though 🙂
0 Kudos
Message 2 of 2
(2,896 Views)