Concerning your question: the knowledge base document you mentioned concerns an error message that happens "[...] when I try building an executable [...] the build terminates [...]". I wanted to clarify that in my case I can BUILD the application without an error message of the compiler. Moreover, I can START the compiled version of the program without an error. But when I press the 'calculate ramp'-button the error message appears and this is the time when the main.vi actually has to call the sub.vi.
as I finally managed to solve the problem I want to share that information in case anyone runs into a similar situation.
It is just necessary to uncheck 'exclude files from vi.lib' for the llb-Build Specifications on the 'Additional Exclusions' tab. Then the compiled version will include a separate version of the 'lvanlys.dll'-file, that is referenced by the llb. I did played with this setting earlier but obviously something else was wrong by then.
For a description of vi.lib see: http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/organization_of_labview/
In addition to my previous posting I want to mention that for the described solution (unchecking 'exclude files from vi.lib') the resulting llb-file will (besides 'subVI.vi') also contain all sub-functions that are used by 'subVI.vi'. However, I want the llb-file to contain only 'subVI.vi' and I also found a solution to make that working: leave 'exclude files from vi.lib' checked AND include 'ramp pattern.vi' in the build specification of the main.vi. The appended example shows how to do that. The funny thing is that this specific inclusion is only necessary for the 'ramp pattern.vi' while all other functions do not need it (e.g. the 'someFunction.vi' in my example is also only referenced by the subVI.vi but works without the need to include it).
It looks to me like your problem was caused by you not adding the 'subVI.vi' as a Dynamic VI when you specified the source files. If you had done that, the lvanlys.dll would have been automatically added to a data folder. I rebuilt the program with the correct build settings for the source files and had no problem.
Message Edited by Dennis Knutson on 08-24-200709:08 AM
Well, including the sub.vi as a dynamic VI in the main.vi build-specification does of course also result in a working stand-alone appliation. But it would also include the sub.vi twice: in the llb as well as in application.exe.
What would be required is that the application builder only adds the functions required by 'subVI.vi' but not 'subVI.vi' itself. The work-around I described in my previous posting does exactly that, but I still believe application builder should be able to do that without the work-around.