Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while importing Shared Library: Library specified for this node cannot be found or cannot be loaded

Solved!
Go to solution

There was a bug fix in 8.6

 

107352 - Zip builder fails with error 7 when including application or shared library build spec outputs

 

0 Kudos
Message 11 of 28
(2,606 Views)

Hello Muks,

 

I am using LabView 2009 for Linux. 

 

With the ID how can I update the fix in LV?

 

Thanks,

 

-H

 

 

0 Kudos
Message 12 of 28
(2,601 Views)

Hi H P,

 

Can you cut and paste that file path into a file explorer and navigate to the file okay?

 

Kristen H.

0 Kudos
Message 13 of 28
(2,599 Views)

Hello Kristen,

 

I am not sure how to create File Explorer. But my guess is by:Right clicking onto Call Library Function Node->Configure->Functions and uncheck the "Specify path on Diagram".

 

When I do so, and specify thefile path I get the message, as shown in attachment : FileExplorerError

 

I have also attached the project, if you can take a look at it.

 

Thank you.

 

Regards,

 

Hita.

Download All
0 Kudos
Message 14 of 28
(2,597 Views)

Hi H P,

 

File Explorer is the Windows way of navigating through files.  Outside of LabVIEW, can you navigate to the file you are trying to call to verify it exists?

 

Kristen H. 

0 Kudos
Message 15 of 28
(2,579 Views)

Hello Kristen,

 

Yes, I am able to navigate to the directory where the library is present through the File Manager on my Linux machine 

 

My library (libAdditionC.so) is present in the following directory structure:

/home/user1/A/B/C

 

In the Configure option of the v, I have checked the 'specify path on diagram'; mentioned the file name (libAdditionC.so)in the 'Library name or path' and mentioned the path (/home/user1/A/B/C) in the Vi.

 

-H.

0 Kudos
Message 16 of 28
(2,578 Views)

Hi H P,

 

Open console and type cd command then a space followed by the file path (cut and paste to ensure there are no typos).  It will look like this:   cd /home/hita/natinst/libraries/Addition/lib

 

 

See if the AdditionC.vi is in that directory.  If the file is there, it might be a permissions issue.  Verify that the permissions are correct.

 

 

Also, have you tried prompting the user to navigate to the path instead of hardcoding the path in? Does the same error appear?

 

Kristen H.

0 Kudos
Message 17 of 28
(2,558 Views)

Hello Kristen,

 

Thank you for your post. I appreciate your help.

 

Yes, I do see the shared library(libAdditionC.so) present in the path: /home/hita/natinst/libraries/Addition . This is the path that is added to the  Call Library Function Node. The sub vi (addition C.vi)which contains the Call Library Function Node is present in /home/hita/natinst/libraries/Addition/VIs.

 

The  permission of the sub Vi and the shared library are correct (I have set them to 777).

 

I have also tried prompting the user to navigate to the path by using File Dialog, but that does not help either and also gives Error 7. If I uncheck the 'Specify path on diagram' I get the same error except that it doesnot have the 'Error 7' heading (see attached ErrorMessage1).

 

Please advise what I can do to get it working.

 

Thanks.

 

-H

0 Kudos
Message 18 of 28
(2,554 Views)

Hi H P,

 

I believe there may be a problem with the build of the shared object file.  A colleague of mine with a Linux system tried to open your file and received the same error.   Take a look at this KnowledgeBase and try the build again: http://digital.ni.com/public.nsf/allkb/95D99D152644EEEA86256D1800742207?OpenDocument

 

Kristen H.

0 Kudos
Message 19 of 28
(2,537 Views)

Hello Kristen,

 

 

I tried to build the library again, but I am still getting the same error. I used the commands mentioned in the link except that I used g++ instead of gcc because the code is in C++.

 

g++ -fPIC -c AdditionC.cpp   
ld -G -o AdditionC.so AdditionC.o

 

I do not think the problem is related to building of the shared library. LV is not able to detect the file path. Could it be a possible bug?

 

Attached is my C++ file.

 

Thank you.

 

Regards,

 

-H.

0 Kudos
Message 20 of 28
(2,518 Views)