How to add dll library to application?

I start programmed the CVI a few weeks ago and I have a little problem. I must make an application layer for profibus master device. However I total do not know how to add dynamic library to program, because in another way I get the error: undefined symbol. I know that it very trivial, but I cannot find solution. I have a lib file and also I include file about device, but I still get the error – undefined symbol – can you help me?
Thanks very much for any advice or help

Dear laszku,
Are you looking for solutions to connect your CVI application with PLC? Because there are also solutions for that which are easy to use, and to implement with CVI.
If you want to use your DLLs, there are some on-line help, how to import them in CVI.
Basicaly there are two different method to import DLLs:
- static import, when you import the library in your CVI project. The dll will be loaded when the exe starts running. If there is an issue to load the library, you'll be able to get the error at compilation time.
- dynamic dll import, when you load the library at run-time. With this, you get the flexibility to control, when will be the dll linked to your exe in the memory, while running. The disadvantage is, you'll get errors only at run-time.
I recommend you some of our on-line tutorial, how to load DLL into your application in CVI:
CVI Help: Loading Dlls - This says: You cannot import DLLs directly into your project. You need to create DLL Import Library, which can be imported into your project.
To do so, look at this knowledge base: Creating Import Libraries for a DLL in LabWindows/CVI
You might get answers for your following questions at this FAQ page:
FAQ: Using Dynamic Link Libraries with LabWindows/CVI
Some help sites:
Rules for Using DLL Files
Linking to Functions Defined in a DLL From LabWindows/CVI
If you need dynamic linkink, you can get example code with this site:
How Can I Access DLL Functions in a LabWindows/CVI Program Without Including the Import Library in t...
I hope, I could help you to find the way how to import DLL libraries.
If you still couldn't solve the error after studying the links, please provide me more information, where, which symbol is missing, and also the full error message.
The error you get, can be caused by the linker or pre-compiler also, which doesn't find the symbol you requested. Please check the path of your library and dll also.
Best Regards,
Tamas Szekely
Applications Engineer
National Instruments

Similar Messages

  • How to add a library (libSomeRandomlib.so) to a project....??

    Ok, so I've been trying to get CERN's ROOT program/libraries to work in an xcode project for a while, but I'm running into one really weird error, and I think I may just not know how to add a library to a project correctly.
    Suppose I create a new Xcode C++ command line tool project. I hit Build and go, and it gives me a nice little Hello World! in the console, just as it should. If I then click on the project in Groups & Files, go to Project>Add to Project..., and choose, say, libCint.so, from my root/lib directory, and click ok, then click Build & Go, I get an error in the console:
    dyld: Library not loaded: @rpath/libCint.so
    Referenced from: /Users/paulthompson/Documents/Programming/Build Products/Debug/LibraryIncludeTest
    Reason: image not found
    sharedlibrary apply-load-rules all
    Data Formatters temporarily unavailable, will re-try after a 'continue'. (Cannot call into the loader at present, it is locked.)
    My assumption is that either I'm missing a step in the process of adding a library, or else there is something jacked up with the libraries themselves. Anyone have any advice?
    Thanks,
    Paul
    EDIT* Oh, I should mention that the actuall binary that gets built after adding the library WILL execute properly in the Finder, or from terminal, just not with the Build & Go, or Go commands from within xcode.
    Message was edited by: TraxusIV

    TraxusIV wrote:
    Results of otool:
    LibraryIncludeTest:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
    Macintosh-9:Debug paulthompson$ otool -L /Applications/CERNRoot/root/lib/libCint.so
    /Applications/CERNRoot/root/lib/libCint.so:
    @rpath/libCint.so (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
    I honestly don't know much about @rpath. I found this page that explains it a bit more: http://blogs.sun.com/dipol/entry/dynamiclibraries_rpath_andmac
    So, since I don't want to deploy with the environment variable set, I should ask, what IS the correct, MacOS X way to do it?
    The best way to find that is to look at how Apple does it. They put frameworks in /System/Library/Frameworks and regular shared libraries in the standard places. You can do the same. Put your frameworks into /Library/Frameworks and your shared libraries into /usr/local-based paths.
    If you want to create stand-alone executables that can be installed via drag-n-drop, you can put shared libraries inside the application bundle. If your shared libraries/frameworks are elsewhere, you will need some sort of installer to get them installed.
    I've been sifting through Apple's developer documentation but I have yet to find a concise, straightforward explanation of how to add shared libraries. I'm horribly confused at this point. Is there a good tutorial available anywhere for both the general unix case of linking to dylibs and .so's, and the Mac specific case?
    Hopefully someone else knows an answer for this one.
    *EDIT* I do already have the variable defined both in ~/.MacOS/environment.plist and also in Xcode as an additional user variable.
    I'm not sure about the whole RPATH thing. Setting environment.plist will define environment variables for use in the Finder, but that is really a hack. There are better ways to do it, but if you are porting some open-source programs, that may be the only way. You should be able to define those variables in Xcode. You have to selected the debug executable under "Exectuables"

  • How to add dll file in plugin

    Hi everybody,
    I have a short question concerning the plug-in.
    I created a plug-in  using visual studio 2005 for Adobe effect cs4
    but i want to add dll on that plugin so,how to add dll in that plugin
    please help me!!!!
    Thanks

    Any other dependencies apart from C/C++ runtime, for example cuda
    runtime which you cannot link against statically - you have to copy it
    into After Effect support files, where the executable lives (or in
    windows library directory, but that i would rather not do)!
    Am 19.06.2011 16:15, schrieb shachar carmi:
    to include external dependencies in the plug-in, go to:
    Project Properties -->  C/C++ -->  Code Generation
    and change the "Runtime Library" to "/MT"
    this should make the compiler include the needed code from other DLLs in your code.

  • How to add dll file to EAR project

    hi,
    i am working with JNI . how to add .dll files to EAR for deployment in NetWeaver.
    regards
    Guru

    HI
    GOOD
    GO THROUGH THESE LINKS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2583bbf9-0701-0010-8db5-a558e0c6f1fe
    http://support.businessobjects.com/documentation/product_guides/boexir2/en/xir2_bip_install_en.pdf
    THANKS
    MRUTYUN

  • How I add a LIBRARY ITEM to a page layout, top/bottom ?

    how I add a LIBRARY ITEM to a page layout, top/bottom ? in
    dwmr mx 2004 and cs4 ?

    Have you looked at the DW help file - it will explain all
    about library items :-)
    Nadia
    Adobe® Community Expert : Dreamweaver
    Unique CSS Templates |Tutorials |SEO Articles
    http://www.DreamweaverResources.com
    CSS Tutorials for Dreamweaver |
    http://www.adobe.com/devnet/dreamweaver/css.html
    Book: Ultimate CSS Reference (aff link) |
    http://www.sitepoint.com/launch/005dfd4/3/133
    http://twitter.com/nadiap
    "lse987" <[email protected]> wrote in
    message news:gpsvtt$t5q$[email protected]..
    > how I add a LIBRARY ITEM to a page layout, top/bottom ?
    in dwmr mx 2004 and cs4 ?

  • Help:  How to add a library item to hide the default Window menu

    Hi,
    In this post: Help: How to add a library item to hide the default Window menu, it described how to create an menu that will hide the default window menu.
    I'd like to know if there a way to put this component into library so that others can directly inherit this menu in other FORMS and how to implement it.
    Jimmy

    Hi,
    I found the solution and the post was not properly phrased. There is no need to add menu into library. All we need is to put the compiled menu into Oracle AS and add the menu name the menu module of the given form.
    Thanks.
    Jimmy

  • How to add the library of linphone into existing project ?

    How to add the library of linphone into existing project ?

    How to add the library of linphone into existing project ?

  • How to add push button in application tool bar in SAP transaction VA01

    How to add push button in application tool bar in SAP standard transaction VA01 and how to implement the code for that function code.

    There is no scope to create a push button in application tool bar. Instead of that we can add in a menu bar.

  • How to add log to an application

    Hi,
    Can anyone give me the procedure for how to add logs to my application
    Regards
    Padma

    Padma. My understanding is that logging is the same way in Web Dynpro as in a normal J2EE app.
    Maybe this section in sap.help will be of use to you.
    http://help.sap.com/saphelp_nw04s/helpdata/en/fe/4f5542253fb330e10000000a155106/frameset.htm
    I haven't personally used SAP's logging because we ported our apps from WebSphere and we were already using log4j. We evaluated SAP's logging and didn't find that the work involved to switch or bridge log4j to SAP's logging was worth it.
    Good luck

  • How to terminate VB process that calls VI Dll Library when application closed

    I have simple VB application to call VI DLL library. The problem is the VB executable file will reside in processes list even close the VB application. Looks like VI DLL does not free from memory when VB application unloaded. Did I miss something to terminate or unload VI DLL in VB program or VI program?

    Well, I'm afraid we're down to good old-fashioned debugging tricks - something is happening that the OS doesn't want to kill. You can try to comment out sections of the VI (new feature in LV 8.2!) to see when it starts to work, or review the code looking for things like event handlers, callbacks, mutexes, open file handles, etc. It's hard to say what going wrong at this level. Also if you are calling out to 3rd party code (Call Library Node, ActiveX, .NET), make sure that it isn't creating such items and holding onto them.
    General rules of thumb...
    1. If you don't have a shutdown VI, or some sort of reference close VI, each VI you call from outside (DLL function) must exist with nothing left in LabVIEW - for example, no registered event handlers, no open file handles, etc. Just like camping, "leave it like you found it".
    2. If you do have such a shutdown, ensure that everything is indeed being shutdown correctly.
    Sorry I can't be more specific.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • How to load DLL library on Labview?

    Hi
    I have an application that is working well in Visual C++ 2012. I would like to load the dll library on labview and to execute the code on labview. I have only the DLL file, the working application and the help file. Is it possible to realise this task on labview using Call Library Function Node.
    I have par example the following code in .cpp file:
    void CMTBClientUsingCOMDlg:nBnClickedConnect()
    // TODO: Add your control notification handler code here
    try
    // login to MTB, using english language
    m_MTBConnection->Login(("en"), &m_ID);
    // get MTB root (forcing an internal QueryInterface() on IMTBRoot!)
    m_Root = (IUnknown*)(m_MTBConnection->GetRoot((BSTR)m_ID));
    // ask root to return the number of devices
    int count = m_Root->GetDeviceCount();
    // list all devices
    for (int i=0; i < count; i++)
    _bstr_t name = ((IMTBIdentPtr)m_Root->GetDevice(i))->GetName();
    m_ComboDevices.AddString(name);
    if( m_ComboDevices.GetCount() > 0)
    m_ComboDevices.SetCurSel(0);
    OnCbnSelchangeDevices();
    m_BtnConnect.EnableWindow(false);
    m_BtnDisconnect.EnableWindow(true);
    catch(_com_error e)
    // connection close
    OnBnClickedDisconnect();
    DisplayError(&e);
    How to execute this code on labview?
    Best regards

    Hi
    I have attached the help file describing the dll library (MTBApi.dll). My working program made on Visual C++ Dot Net is very big and therefore I can’t attach it.
    In my header file I import at the beginning the dll library on this way:
     #import "MTBApi.tlb" named_guids
    using namespace MTBApi;
    Than I have a class:
    class CMTBClientUsingCOMDlg : public CDialogEx
    public:
    CMTBClientUsingCOMDlg(CWnd* pParent = NULL); // standard constructor
    ~CMTBClientUsingCOMDlg(); // standard destructor
    enum { IDD = IDD_MTBCLIENTUSINGCOM_DIALOG };
    protected:
    virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
    protected:
    HICON m_hIcon;
    IMTBConnectionPtr m_MTBConnection;
    IMTBRootPtr m_Root; 
    CComBSTR m_ID; 
    IMTBChangerPtr m_Changer; 
    IMTBDevicePtr m_Device;
    DECLARE_MESSAGE_MAP()
    public:
    afx_msg void OnBnClickedConnect();
    CButton m_BtnConnect;
    In my .cpp file I have:
    CMTBClientUsingCOMDlg::CMTBClientUsingCOMDlg(CWnd* pParent /*=NULL*/)
    : CDialogEx(CMTBClientUsingCOMDlg::IDD, pParent)
    m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
    CoInitialize(NULL);
    try
    // create an instance of the connection class which can connect to the server
    m_MTBConnection = IMTBConnectionPtr(CLSID_MTBConnection);
    catch(_com_error e)
    CMTBClientUsingCOMDlg::~CMTBClientUsingCOMDlg()
    void CMTBClientUsingCOMDlg:isplayError(_com_error* e)
    void CMTBClientUsingCOMDlg:oDataExchange(CDataExchange* pDX)
    CDialogEx:oDataExchange(pDX);
    DDX_Control(pDX, IDC_CONNECT, m_BtnConnect);
    BEGIN_MESSAGE_MAP(CMTBClientUsingCOMDlg, CDialogEx)
    ON_BN_CLICKED(IDC_CONNECT, &CMTBClientUsingCOMDlg:nBnClickedConnect)
    END_MESSAGE_MAP()
    BOOL CMTBClientUsingCOMDlg:nInitDialog()
    CDialogEx:nInitDialog();
    void CMTBClientUsingCOMDlg:nPaint()
    void CMTBClientUsingCOMDlg:nBnClickedConnect()
    try
    // login to MTB, using english language
    m_MTBConnection->Login(("en"), &m_ID);
    // get MTB root (forcing an internal QueryInterface() on IMTBRoot!)
    m_Root = (IUnknown*)(m_MTBConnection->GetRoot((BSTR)m_ID));
    // ask root to return the number of devices
    int count = m_Root->GetDeviceCount();
    // list all devices
    for (int i=0; i < count; i++)
    _bstr_t name = ((IMTBIdentPtr)m_Root->GetDevice(i))->GetName();
    catch(_com_error e)
    // connection close
    My question is how to start this code in labview. How to write the function in labview, par example this function:
    m_MTBConnection->Login(("en"), &m_ID);
    Best regards
    Attachments:
    MTBApi.zip ‏1935 KB

  • How to add a library dynamically in xcode

    Hi friends,
    How do I add a library in xcode project?
    Thanks

    Hello,
    You might get better help in the Developer Forums...
    https://discussions.apple.com/community/developer_forums?view=overview
    Good luck!

  • How to add a library jar to a EJB module?

    Hi All,
    in J2EE the normal procedure to a library jar to a module, is to add the library in the Class-Path header of the manifest of the module, and then include the actual jar in the root structure of the ear file. Unfortunately it is not clear to me how S1S5 update 1 supports this. The only option Studio I found so far, is to add the jar as a 'file to include', but then the contents is added to the module jar and not to the ear file itself, resulting in duplication of classes across modules. Is there an option to add the library jar in the Class-Path of the module?
    Thanks in advance,
    Stijn

    I believe that better support for this was added in the Sun Java Studio 6 EA release. It was added to the Extra Files property on an EJB Module.

  • How to add a module in application

    Hi All,
    I want to add a new module in application. In Database it is OK. But in application i upload the new module in prodappl folder. But how to set his TOP Plse suggest.
    Many Thanks
    Ghanshyam

    Hello,
    What is the database and applications versions?
    Additionally please see the following threads;
    https://metalink.oracle.com/metalink/plsql/f?p=200:27:4314145935944948375::::p27_id,p27_show_header,p27_show_help:199619.995,1,1
    Oracle Metalink: How to add a new module to existing 11i installation. Doc I.D. 199619.995.
    https://metalink.oracle.com/metalink/plsql/f?p=200:27:4314145935944948375::::p27_id,p27_show_header,p27_show_help:230513.995,1,1
    Oracle Metalink: install 11i all modules? Doc I.D. 230513.995.
    https://metalink.oracle.com/metalink/plsql/f?p=200:27:4314145935944948375::::p27_id,p27_show_header,p27_show_help:645423.995,1,1
    Oracle Metalink: how to install only needed products? Doc I.D. 645423.995.
    Adith

  • How to add packed library on palette set

    Hi,
    I am unable to add packed library to pallete set. Can someone provide information on how to do that?
    Thanks,
    Andrej 
    Solved!
    Go to Solution.

    Andrej,
    starting with LV 2010, you can use packed libraries to encapsulate functions and supply them on the palettes. The way to get there is somehow a little tricky, so here a short description on how to do that:
    1. Build your LV library (lvlib) as used, please remember to set prudent item settings (private vs. public). Public items will be "exported" in the packed library whereas private are not.
    2. Open the palette edit tool via Tools >> Advanced >> Edit Palette Set
    3. Go to the subpalette you want to include your custom palette (exported items) and right click on the parent palette. Select Insert >> Subpalette.
    4. In the dialog, select Create a new palette file (.mnu). Select a path contained in your lvlib.
    5. Customize your subpalette as desired. Please place only public items on the palette.
    6. Save the changes and add the new .mnu file to your lvlib.
    7. Build the packed library. Make sure, that the .mnu file is part of the lvlibp (by default it is already selected).
    8. Copy the lvlibp to the target system.
    9. Select Tools >> Advanced >> Edit Palette Set in the target. Browse to the palette you want to have as parent for your lvlibp.
    10. Right click and select Insert >> Subpalette. On the dialog, select Link to a palette file in a project library. Select your lvlibp file and acknowledge the following dialog.
    11. Save changes and use your lvlibp on the target.
    That should be a comprehensive step-by-step list for this request.
    Hope this helps,
    Norbert
    [EDIT] Corrected some typos.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for

  • After upgrading HANA from rev. 69.1 to rev.72 OOM errors occure during HDB startup

    Hello, we upgraded our HANA scale out system from rev. 69.1 to rev. 72. ~4 hours after the upgrade our HDB crashed with OOM errors on  the master indexserver. Since than we are trying to start it back up and face OOM errors during startup in the inde

  • Acrobat 9-Possible to Crop to TrimBox?

    Hello, I have a feeling this is very easy to do. I am not familiar with any acrobat scripting. Where's the object model viewer? How do you add the script?(I hate this question) I know I can figure it out with a little research. Any help would be a ve

  • N86 problem....PLZZZZ HELP!!!!

    i have bought this new nokia n86 8mp in jan and have been dealing with problems since then....first of all the colours of the phone crashed and the screen was replaced in 15 days from the date of purchase.,,,,then the colours again crashed and the ph

  • Missing scroll bars

    From time to time the scroll bars go missing in Safari 4. To get the back I need to open a new tab. Never happened in version 3.

  • Macbook shuts down without charger plugged in, does need a new battery or is it something else? thx

    My macbook works with the charger plugged in but even when it shows it charged without the charger it shuts down. Does it need a new battery or is it something else. How do i check battery life?