CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Posts
    17

    How to use a custom library

    Hi I am trying to use a custom DLL with Dev c++,
    I have the Dll , the .h file and the .lib file
    This is what I am doing

    #include <windows.h>
    #include "XXControls.h"

    ........

    RedrawButton(.. , ..) ;

    And am getting this linker error

    [Linker error] undefined reference to `RedrawButton@8'

    How can I use a custom dll like this ?

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: How to use a custom library

    You need to link to the library. So add <customlibrary>.lib to your linker settings.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  3. #3
    Join Date
    Aug 2005
    Posts
    17

    Re: How to use a custom library

    How can I do that ?

  4. #4
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: How to use a custom library

    Sorry, I never used Dev C++, so I don't know the exact steps to do this. Try to find the linker settings and then find where you could add additional libraries like <customlibrary>.lib.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured