Glenn Posted January 18, 2008 Report Share Posted January 18, 2008 Friends I'm building a simple DLL in LV and I get an error message during the build process: "Error -2147221480 occurred at Building DLL stub. This can be caused by illegal function or parameter names. Please verify your names are legal C identifiers and do not conflict with LabView headers". (attached error2.gif) So, I have 12 inputs and 8 outputs. The function name looks OK to me. It's 18 chars long - is there a length limitation? The parameter names seem to be automatically coerced to be legal C names. So that leaves "LabView headers". I don't know what this is but I'm guessing they're reserved names. I tried changing the only one that seemed possibly used by anyone else and the result was the same. I did a Google search and did not find the answer in the entire 12 hits. The most common cause of this error is naming the dll "labview.dll" - but I didn't do that. There's another error message before the one described above which instructs how to run mktyplib.exe to check the error message in an ".odl" file (attached error1.gif). The result was "Fatal error M0001: Syntax error near line 9 column 2048: unexpected end-of-file" (attached error3.gif). That nice round number (2048) makes me suspect a bug. So I looked in the odl file but it does not look truncated in any way and the line goes far beyond 2048 chars. So maybe it's a bug in mktyplib.exe (apparently originates in MS SDK). I looked in the prodisttool.llb file and found a vi called "Dist Build DLL Stub.vi". I hoped to modify it to break the line before 2048 chars. But it's password protected! I then edited the .odl file by inserting an EOL (end of line=carriage return + line feed) within the huge line that exceeds 2048 chars and ran the mktyplib and it instead ended in success (attached success4.gif). But this doesn't give me by DLL, only a ".tlb" file. The App-builder has received the original error code and will not proceed to build the DLL. So it seems I need a better mktyplib.exe or to add logic in the app builder to split the long line. However, I have not found newer versions of mktyplib via google and most of the vi's in the app-builder are password-protected. If I try to open the app builder vi to read the BD, it begins execution immediately and I can't see the BD. Any ideas? Has anyone seen this before? I'm using LV6.0.2 on XP Pro SP2. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.