Machine Vision

取消
显示结果 
搜索替代 
您的意思是: 

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

已解决!
转到解答

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 项奖励
21 条消息(共 28 条)
2,754 次查看

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 项奖励
22 条消息(共 28 条)
2,735 次查看

Hi H P,

 

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

 

Kristen H.

0 项奖励
23 条消息(共 28 条)
2,715 次查看

Hello Kristen,

 

I am still getting the same error message.

 

Regards,

 

-H

0 项奖励
24 条消息(共 28 条)
2,707 次查看

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.

25 条消息(共 28 条)
2,680 次查看

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 项奖励
26 条消息(共 28 条)
2,617 次查看

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 项奖励
27 条消息(共 28 条)
2,591 次查看
解答
已被主题作者 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 项奖励
28 条消息(共 28 条)
2,550 次查看