Great, thanks! Seems to work fine on the simple VI that I have just tested.
For the benefit of anyone else attempting the same thing, here is how I got this to work:
1) create a build specification for a shared library and select the "embedded runtime" option (this option is sadly only available for shared libraries, not if you are building an executable). Make sure you add at least one method/function to the prototype/interface - for many applications this will simply involve adding your top level VI and accepting the default settings of void myViName()
2) Make sure you have the requisite libraries on your machine. On Ubuntu Edgy Desktop this involved "sudo apt-get install libc6-dev" and "sudo apt-get install build-essential"
3) hit Build in Labview
4) Write a simple C++ program to call your shared library. Mine looked like this:
#include "libWriteText.h"
int main()
{
WriteTextFile();
return 0;
}
Save this as whatever.cpp in your build directory (set in your labview build spec), which should be full of stuff created by labview. Here, libWriteText.h was the name of the VI-specific header file that labview created, and "WriteTextFile" was the name of the function that I declared in the "Prototypes" section of the build spec.
5) run "g++ -o myTestProgram writeTextFile.cpp -L. libWriteText.so /usr/local/natinst/LabVIEW-8.2/AppLibs/liblvrtdark.so.8.2.1" from the command line in the build directory. This builds an application out of the C++ file you have just written, the shared library created from your VI and the "dark" (i.e. no display) labview runtime library.
6) run your application. You will probably have to sort out your ld paths first - either add the new library to /usr/lib and run "sudo ldconfig" or run "export LD_LIBRARY_PATH=/path/to/my/new/library" before executing your app.