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

Hi H P,

 

Can you try building a shared object with LabVIEW and call that object as you are in your wrapper VI?  Are you able to call the simple shared object from any other environment successfully?

 

What Linux distribution and version are you using?

 

Kristen H.

0 Kudos
Message 21 of 28
(2,670 Views)

Hello Kristen,

 

I am not sure how to create a shared object using labview. I am using a trial version so, I cannot create a shared object of a LabView VI as it doesnot support Application Builder(I am not sure if that is what you meant).

 

Unfortunately, I have LV installed only on my Linux machine, so I can not test on any other environment. I am using SuSE 11.1

 

-H.

0 Kudos
Message 22 of 28
(2,651 Views)

Hi H P,

 

Can you try using the attached *.so?   Let me know how it goes.

 

Kristen H.

0 Kudos
Message 23 of 28
(2,631 Views)

Hello Kristen,

 

I am still getting the same error message.

 

Regards,

 

-H

0 Kudos
Message 24 of 28
(2,623 Views)

Hi H P,

 

In the attached folder there is an example VI that calls a shared object entitled "SharedLib.so".  When you run the VI, it will prompt you for the file path. Navigate to the unzipped folder and select "SharedLib.so". Let me know if that gives you the same error.  This will help us narrow down where the problem is coming from.  The function prototype matches the declaration in the shared object, so it should work okay- and has on OpenSuse 11.2.

 

Kristen H.

Message 25 of 28
(2,596 Views)

Hello Kristen,

 

Thank you for your reply. I am terribly sorry for not being able to reply back earlier.

 

Yes, your attached file works fine. But I fail to understand why my vi doesnot work. Can I ask you if you built the Shared object on a 32 bit machine? I am using a 64 bit machine and the LV 2009 Linux that I amusing is 32 bits. 

 

-H

0 Kudos
Message 26 of 28
(2,533 Views)

Hey H P,

 

I am not positive whether or not Kristen had built the shared object on a 32-bit machine. But, if I had to guess, I would guess that the shared object was made on a 32-bit machine. Do you have a 32-bit machine available? What if you create a shared object on the 32-bit OS and then bring it over to your current machine.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 27 of 28
(2,507 Views)
Solution
Accepted by topic author H P

Hello!

 

Thank you all. I finally got it working.

 

I had to compile my code with -m32 option, to create a 32 bit shared object. I also had to change my .h file to:

 

#ifdef __cplusplus
ectern "C"
#endif

 

 //function declaration

 

#ifdef __cplusplus
}
#endif

 

-H

0 Kudos
Message 28 of 28
(2,466 Views)