LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The library specified for this node cannot be found or cannot be loaded.

FULL MESSAGE: "The library specified for this node cannot be found or cannot be loaded. Right-click the Call Library Function node and select Configure, then choose the correct library name or path."

 

Hello. I would like to call several functions from a custom library that I have written. I want to do this via the call library function block. When I put the block down on the VI, and then attempt to hook up inputs/outputs, I get the error denoted above. 

 

Relevant details:
    -64 bit windows 7

    -32 bit LabVIEW

    -libraries are compiled using 32 bit cygwin

    -library's permissions are set to "full control" to everyone

    -the call library function node's inputs/outputs match the arguments/return values of the library call

 

Please advise.

0 Kudos
Message 1 of 10
(9,617 Views)

More details:

    -I have since revised my compilation to force export of all functions. I have opened the dll in dllexp (dll export viewer) and confirmed that they are exported.

    -I have opened the library in depends.exe (dependency walker) and noticed that my PATH variable was not correctly set to reference the libraries on which my library depends. This has been fixed. 

    -When I configure the node, I notice that, after selecting my .dll file, i can choose from all of the actual function names within my library to call. This indicates to me that LabVIEW is loading the library properly to some degree.

0 Kudos
Message 2 of 10
(9,592 Views)

Hey Deblonj,

 

After you configure the function and choose the DLL, you are choosing the function you want to call and setting up all of the parameters correct? Could you upload your DLL perhaps, so I can try accessing it with the node and seeing if I get the same error? That error message doesn't give us much to go on, aside from the fact that it won't interact with your DLL for some reason.

Eden K
Applications Engineer
0 Kudos
Message 3 of 10
(9,541 Views)

 

> After you configure the function and choose the DLL, you are choosing the function you want to call and setting up all of the parameters correct?

 

yes.

 

 >Could you upload your DLL perhaps, so I can try accessing it with the node and seeing if I get the same error?

 

Since I am working with trade secret material, no. I can attempt to scrub the IP from the library and make you something else though. This will take some time, however.

 

>That error message doesn't give us much to go on, aside from the fact that it won't interact with your DLL for some reason.

 

Are there other error messages that I can find somehow? Are there logs of this activity that can be found? Seems like there's a lot that could go wrong with this whole process and there isn't much to go on for troubleshooting...

 
0 Kudos
Message 4 of 10
(9,514 Views)

Alright, so I tried to do something a little different: I made another library and tried to link with that one. This library has next to nothing in it, and the functions are do-nothings. Essentially i want to confirm that I'm doing the process correctly. I have attached the dll and the header.

 

When i try to link with this dll, I get the following: 

 

Error loading "C\Users\deblonj\Desktop\tmp\mylib.dll" Invalid access to memory location.

 

These are my gcc calls:

 

gcc -c -m32 mylib.cpp

gcc -c -m32 mylib.cpp g++ -shared -o mylib.dll -Wl,--out-implib,mylib.dll.a -Wl,--export-all-symbols -Wl,-enable-auto-image-base -m32 mylib.o

Download All
0 Kudos
Message 5 of 10
(9,500 Views)

Do you have any other non native DLLs you can try to open with the call library function node to see if you get the same error? I would search through the forums for your same error and see what resolved the issue for some other people. I'm also attaching a general troubleshooting guide for the Call Library Function Node and DLLs/shared libraries in general.

 

http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcodeconcepts/debug_dlls_and_dll_calls/

Eden K
Applications Engineer
0 Kudos
Message 6 of 10
(9,497 Views)

More data!

 

I have successfully linked and run a test application that uses the library that I uploaded earlier. LabVIEW still refuses to let me call the functions, however.

Message 7 of 10
(9,478 Views)

So just to clarify, you aren't able to interact with that simple DLL that you created in LabVIEW either? What version of LabVIEW are you using?

Eden K
Applications Engineer
0 Kudos
Message 8 of 10
(9,432 Views)

\

Thank you 

0 Kudos
Message 9 of 10
(8,978 Views)

I know this is kinda old but I got here from google so I'll just post my solution:

 

I had this problem because I specified my .dll by path and not just by name! Just put the name in the box that says 'Library name or path'.

 

Scratch that, it didn't actually help.

0 Kudos
Message 10 of 10
(7,960 Views)