Resolving Callback References from .uir Files
- Updated2023-02-21
- 1 minute(s) read
When you link your program in LabWindows/CVI, LabWindows/CVI keeps a table of the non-static functions that are in your project. When your program calls LoadPanel or LoadMenuBar, the LabWindows/CVI User Interface Library uses this table to find the callback functions associated with the objects you load from the user interface resource (.uir) file.
When you link your program in an external compiler, the external compiler does not make such a table available to the User Interface Library. Complete the following steps to use LabWindows/CVI to generate a source file that contains the necessary table.
- Create a LabWindows/CVI project that contains the .uir files your program uses, if you do not already have one.
- Select Build»External Compiler Support in the Workspace window to open the External Compiler Support dialog box.
- Set the UIR Callbacks control to Source File and enter the pathname of the source file you want to generate. When you click the Create button, LabWindows/CVI generates the source file with a table that contains the names of all the callback functions referenced in all the .uir files in the project. When you modify and save any of these .uir files, LabWindows/CVI regenerates the source file to reflect the changes.
- Include this source file in the external compiler project you use to create the executable.
- You must call InitCVIRTE at the beginning of your main or WinMain function.