How can I use a shared library made with the application builder?

Hi,
I am using LabVIEW 7.1 running on Slackware 10.1 (kernel 2.4.29) and I am trying to call a graph display from a C program that I use for debugging VME access from a VMIVME controler. So using the application builder I built the VI as a shared library (graph.vi -> graph.so) containing a function called "graph". In my main program the call to the dlopen fails with the error: "graph.so: undefined symbol: UninitLVClient". When I examin graph.so with nm I see that UninitLVClient and other LabVIEW functions are indeed undefined and using ldd shows that graph.so has dependencies only on libc.so.* and *linux*.so.* but not on LabVIEW related stuff. Those functions are defined in the liblv.so that's in the cintools directory but I have no idea if the user is supposed to use that.
So I think I am missing an important concept here. Can somebody help or direct me to some documentation (I found lots of information about how to link external code to LabVIEW but nothing about how to link LabVIEW code to an external program)?

Thanks Watermann,
your message has been very useful so now I am linking to the proper library but I still have problems when trying to load dynamically the shared library produced with LabVIEW. It is strange that I could successfully load the lvrt library at loading time but it does not work when I am loading the library at execution time.
I made a small LabVIEW program that prints a hello window and I am calling it from a C program. In the first program main.c I am linking to the lvrt library at loading time and it works but in the second one I am linking dynamically at execution time and it does not work. For my work I need to be able to load code done in LabVIEW at execution time. Any help is appreciated!
Program main.c:
// small program to call a LabVIEW shared library
#include
#include
#include "hello.h" // got this from the LabVIEW builder, i.e. when I made the hello.so
int main(void)
printf("Hello from C!\nLets call LabVIEW now\n");
hello();
printf("Bye ... \n");
return 0;
The command to compile main.c, i.e. linking shared library lvrt when loading main program:
gcc -Wall -I /usr/local/lv71/cintools/ -o main main.c hello.so -l lvrt
The LD_LIBRARY_PATH has been defined and exported:
$ LD_LIBRARY_PATH=$PWD
$ export LD_LIBRARY_PATH
IT WORKS!
Program main2.c:
// small program to call a LabVIEW shared library
#include
#include
#include
int main(void)
void * h_lvrt;
void * h_hello;
void (* hello)(void);
char * error;
printf("Hello from C!\nLets call LabVIEW now\n");
// open LabVIEW RunTime shared library
// in my computer located at /usr/local/lib/liblvrt.so
h_lvrt = dlopen("/usr/local/lib/liblvrt.so", RTLD_NOW);
// check for error
error = dlerror();
if (error) {
printf("error : could not open LabVIEW RunTime library\n");
printf("%s\n", error);
return 1;
// open hello shared library
// in my computer located at /home/darss/lv_call/hello.so
h_hello = dlopen("hello.so", RTLD_NOW);
// check for error
error = dlerror();
if (error) {
// close LabVIEW RunTime shared library
dlclose(h_lvrt);
printf("error : could not open hello library\n");
printf("%s\n", error);
return 1;
// get function hello from library hello.so
hello = dlsym(h_hello, "hello");
// check for error
error = dlerror();
if (error) {
// close hello shared library
dlclose(h_hello);
// close LabVIEW RunTime shared library
dlclose(h_lvrt);
printf("error : could not get the hello function\n");
printf("%s\n", error);
return 1;
// call hello function
hello();
// close hello shared library
dlclose(h_hello);
// close LabVIEW RunTime shared library
dlclose(h_lvrt);
printf("Bye ... \n");
return 0;
The command to compile main2.c, i.e. dynamically linking library lvrt at execution of main2 program:
gcc -Wall -o main2 main2.c -l dl
The LD_LIBRARY_PATH still defined and exported.
IT DOES NOT WORK!
Program output:
Hello from C!
Lets call LabVIEW now
error : could not open hello library
/home/darss/lv_call/hello.so: undefined symbol: WaitLVDLLReady

Similar Messages

  • How can i use Mail on 2 macs with the same mail address?

    Hi,
    I have two Macs, connected through WLAN. From each Mac I can use Mail (sending and receiving) with the same mail address. This worked well; on each Mac I have separate files storing the mails (input, sent, trash, …).
    Some days ago I had to change the provider. (Perhaps this may be the reason for my problem?) Now both mail systems are connected - in the way that if I put on Mac *1 a mail into the trash it is automatically thrown into the trash on Mac *2.
    What is to be done to separate the two systems (i. e. make them independent of each other)?
    Hans

    It looks like you are using a IMAP mail account, a protocol used by most email providers nowadays. Read -> http://en.wikipedia.org/wiki/Internet_Message_Access_Protocol
    The main feature of IMAP is the sync of all the changes you do on your mail account. If you want to keep your mails on one Mac, have a look at this site -> http://kb.mit.edu/confluence/pages/viewpage.action?pageId=3908294

  • How can i use my existing apple account with the app store when i have no credit card or paypal?

    i dont have a credit card or a paypal account how do i use the bloody appstore when i have neither and already have an apple id?

    This user, mountaingoatgirl, explains how to get a None option in your account details in the iTunes app on a Mac or PC. -
    https://discussions.apple.com/message/24907941

  • How can i use my synology iTunes Server with the iTunes from my iPad?

    Have anybody the Same Constalation @ home? I like to have Access to my synology iTunes Server from my iPad via iTunes without a thirdparty App, to have Access to the Central Data like Music, etc.? Have some One expirence with the configuration and implementation?

    It will almost certainly not be possible. If you don't sign up for AT&T service for the iPad, then replace your Sprint card with a MiFi or Overdrive device from Sprint. This will use your Sprint service, but connect to your iPad using Wi-Fi. It also has the advantage of you being able to use it with any Wi-Fi capable device. IOW, you can use both your laptop and iPad at the same time with the MiFi or Overdrive, but only have to pay for one Sprint account. Of course, all devices that connect to the MiFi or Overdrive will use up your 5GB allotment, unless you use Overdrive in a 4G area. (Overdrive is unlimited on 4G, but has a 5GB cap in 3G areas.)

  • How can I use home sharing between our iphones (create playlists from both accounts at once)

    How can I use home sharing between our iphones, so that we can create playlists with songs from both of our libraries?  We share a Macbook Pro (separate accounts) and each have the new iphone, but when I have my iphone and try to create a new playlist, I can only grab songs from one account.  Is there a way to create a playlist using both accounts since we are sharing?
    Does it have to be created within iTunes first on our Mac?

    The short answer: because Home Sharing isn't designed for sharing apps, and apps aren't designed to be shared.
    The longer answer:  Think of it like this...
    You download some music in iTunes.  With Home Sharing, another user can listen to it by streaming it over the network.  But the data itself is on your computer.  If you turn off the computer or take it off the network, the other user can't access it.
    But if you send another user the app, they aren't just streaming the data- they installed it on their iOS device.  Because they weren't the one that purchased it, such a transfer could easily be considered "piracy" or "stealing," and nobody likes that (least of all, Apple). 
    When iTunes sees this app, it obviously recognized it, as if saying, "Hey, how did you get this app on your device, if I have no record of you purchasing/downloading it from the iTunes store?"
    post edited to correct spelling errors

  • How can I use my itunes library for iphoto slideshow?

    how can I use my itunes library for iphoto slideshow?

    Here's a possible workaround:
    Create the slideshow in Iphoto and add a theme and music.
    Install Picasa  and it will include the slideshow on it's indexed list.
    Upload the slideshow to PicasaWebAlbums and send the link to anyone you wish.
    The music and theme is preserved.
    Caveat: My playback pictures appear darker than usual but that could be just lousy photography...:)
    Example:https://picasaweb.google.com/mb2180/Kona2011?authuser=0&authkey=Gv1sRgCPGWz_qPrM XKZA&feat=directlink

  • HT2534 How can I use "Family Sharing" without giving details of my credit or debit card? I do not want to give my cards data, I have always used iTunes prepaid cards.

    How can I use "Family Sharing" without giving details of my credit or debit card? I do not want to give my cards data, I have always used iTunes prepaid cards.

    Hi Saramos,
    When setting up Family Sharing you must have a credit or debit card as your payment method. See this article for reference -
    Family purchases and payments
    When a family member makes a purchase it will be billed to any gift or store credit that they have first. If none exists it will be billed to you.
    As the family organizer, you may not set your billing method for purchases to anything other than a credit or debit card. If you have a store credit such as from pre-paid cards, it may not be shared with other family members. See this article for reference -
    How iTunes Store purchases are billed
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • How can I use "Family Sharing" without giving details of my credit or debit card? I do not want to give my cards data, I have always used iTunes prepaid cards.

    How can I use "Family Sharing" without giving details of my credit or debit card? I do not want to give my cards data, I have always used iTunes prepaid cards.

    Hi Saramos,
    When setting up Family Sharing you must have a credit or debit card as your payment method. See this article for reference -
    Family purchases and payments
    When a family member makes a purchase it will be billed to any gift or store credit that they have first. If none exists it will be billed to you.
    As the family organizer, you may not set your billing method for purchases to anything other than a credit or debit card. If you have a store credit such as from pre-paid cards, it may not be shared with other family members. See this article for reference -
    How iTunes Store purchases are billed
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • HT1660 how can I use one single library for all users on the same laptop?

    how can I use one single library for all users on the same laptop?

    You are most of the way there. Each user having access to hard drive is the key. If users are limited in file privileges this is harder.
    Any files you add to your library and any files she adds to her library are available to the other. Just not automatically. Each user must add the files to their own library using the add file or add folder option from menu bar.
    What I have done is set library location to a location outside of My Documents\My Music. On my network storage I have a folder names s:\itunes. Both accounts iTunes are set to use this location for the library.

  • How can I get my Aperture library back from the Photos application?

    As stated above, How can I get my Aperture library back from the Photos application?  I'm not a fan of Photos right now and haven't used iPhoto in years, so that wasn't a loss... I didn't realize when I gave Photo's access to my Aperture library, I was going to lose it...
    I want to get it back, any suggestions?
    Thanks again!
    MacTeacherMN

    what means ..."Once you open the Aperture library back into Aperture..."? What do I need to "klick" in order to getting back my old Aperture Project structure....

  • I was trying to add an itunes library to my computer, and now my itunes library can not be found. An ipod can be synced with only one iTunes library at a time. How can I find my Itunes library, complete with playlists ?

    I was trying to add an itunes library to my computer, and now my itunes library can not be found. An ipod can be synced with only one iTunes library at a time. How can I find my Itunes library, complete with playlists ?

    I have the same problem too and tried alot of things like time zone , restarting or changing DNS of wifi connection to 8.8.8.8 still nothing happens .. !!
    iPhone 5s, iOS 8.3

  • How can you use iMessage between 3 iPads with 3 different users but only one Apple ID?

    how can you use iMessage between 3 iPads with 3 different users but only one Apple ID?

    No you do not need separate Apple ID's in order to use 3 devices with one Apple ID. I use 4 devices to Message and FaceTime and all use the same Apple ID. You do need to add additional email addresses for the other devices.
    Look at this very informative video for the instructions.
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l

  • I want to hook up a mac mini and us my tv as a monitor. how can I use airplay from my phone on the mac mini like i can with an apple tv (without having to buy an apple tv!). the airplay capabilities i want to use are mirroring and streaming from my iphone

    i want to hook up a mac mini and us my tv as a monitor. how can I use airplay from my phone on the mac mini like i can with an apple tv (without having to buy an apple tv!). the airplay capabilities i want to use are mirroring and streaming from my iphone!

    Download AirPlayer for Mac - Transforms your Mac into an AirPlay-compatible display. MacUpdate.com

  • How can I use a Verizon iPhone 5 with US Cellular?

    How can I use a Verizon iPhone 5 with US Cellular?

    You can't. Doing so is not supported.

  • I purchased a iphone i USA. How can i use this iphone in india with vodafone.

    I Purchased a iPhone 5s in USA. How can I use this phone in India with Vodafone.
    <Edited By Host>

    First, the iPhone would need to be unlocked. That would depend on where you bought it. Next, the North American phone would not work with all of the networks outside of the US. Also, the warranty for the device is only good in the US, so if you have a problem with the phone, you would need to bring it back to the US to an Apple Store. Where did you purchase the phone?

Maybe you are looking for

  • Can lookout control C series modules?

    Greetings, I was wondering if Lookout had the ability to recognise dataAq modules( i.e. NI9205, Ni9265). I have a solenoid that opens or closes a valve using a 4-20 current loop. i sense position with a 4-20 analog input module from Biel-Wiedmann. Bo

  • What is the use of access level

    Hi Experts, What is the access level and what is use of each option in access level 1  Application 2  Superior component 3. Top Component 4. Sap 5. Global and in Details section what is the use Properties tab 1. Application Component 2. Software Comp

  • Photoshop - Web Photo Gallery

    Hello, How can I save Web Photo Gallery in PHP format instead of HTML or in .PHP extension instead of .HTML? Thanks, Simon

  • Help with html dataset filter please

    Hi, I'm using an html dataset as source of product display, showing products by age (age deduced from 'year' of production) on different pages but all using same html dataset Currently I use spry:if to find eg 2 year old products shown on the 2 year

  • Ipod touch will not recharge

    hi my daughters ipod touch showed low battrey so she tried to recharge but this has had no effect we have used a mains adaptor and usb input. she was playing a game when the screen went pink, black and then orange.it then showed the low battery. i ha