Linux Users

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

can i use 64 bit .so file in 32 bit labview?

I have a dll that i want to convert it to .so file so that i can use it in Suse Linux by calling it through Call library function.Suse linux version  that i use is 64 bit.so is there labview version of linux for 64 bit?cos i will be compiling the c program in linux which creates a .so file of 64 bit format, but i think i have labview of 32 bit,so can i call the 64 bit .so file in 32 labview linux version?

0 Kudos
Message 1 of 7
(2,855 Views)
6 REPLIES 6

Re: can i use 64 bit .so file in 32 bit labview?

No you can't. LabVIEW 32 bit can only call 32 bit shared libraries and 64 bit can only call 64 bit shared libraries. Same for Windows with DLLs. But LabVIEW 32 bit should be installable and runnable on 64 bit Linux much like LabVIEW 32 Bit runs on Windows 64 Bit.

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 2 of 7
(1,563 Views)

Re: can i use 64 bit .so file in 32 bit labview?

so the labview 64 bit version is not available is it?

i heard we need to install some userlib files  which am nt sure that will help calling the 64 bit shared linrary frm 32 bit labview...

0 Kudos
Message 3 of 7
(1,563 Views)

Re: can i use 64 bit .so file in 32 bit labview?

You can't ever call 64-bit shared libraries from a 32-bit process (or vice versa). Installing 32-bit libraries isn't to make it so you can call your 64-bit shared library. It's to replace your 64-bit shared library with a compaible 32-bit version that you can call from 32-bit LabVIEW.

0 Kudos
Message 4 of 7
(1,563 Views)

Re: can i use 64 bit .so file in 32 bit labview?

Please see this thread for information and possible workarounds.

0 Kudos
Message 5 of 7
(1,563 Views)

Re: can i use 64 bit .so file in 32 bit labview?

I have a dll that i want to convert it to .so file so that i can use it in Suse Linux by calling it through Call library function.

 

Loading/calling a Windows DLL on Linux ? Well, that is really tricky. Completely different calling convention, and it might need to link bunch of other DLLs, too. You'll have to dive deep into the magic of operating system programming. Investigating the WinE source code might be a good start.

 

BTW: what kind of dll is that ? What do you really need it for ?

 

Suse linux version  that i use is 64 bit.so is there labview version of linux for 64 bit?cos i will be compiling the c program in linux which creates a .so file of 64 bit format, but i think i have labview of 32 bit,so can i call the 64 bit .so file in 32 labview linux version?


Phuh, theoretically possible, but similar to calling Windows DLLs - you'll need to adapt calling conventions and carefully check which other libs it is using. Needs some assembler magic for the call wrappers.

 

The easier approach would writing a separate 64bit server application, which does the actual library calls and a 32bit client library that's called by LV. At that point you can easily put these two sides into separate containers / chroot's, or even separate machines.

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 6 of 7
(390 Views)

Re: can i use 64 bit .so file in 32 bit labview?


@AdamKemp wrote:

You can't ever call 64-bit shared libraries from a 32-bit process (or vice versa). 

Actually, you can. But it's not trivial.

 

Linux Embedded / Kernel Hacker / BSP / Driver development / Systems engineering
0 Kudos
Message 7 of 7
(389 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.