1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with adding DLL/lib file into VC++ Project

Discussion in 'MFC' started by guptesanket, Jul 6, 2010.

  1. guptesanket

    guptesanket New Member

    Joined:
    Jul 6, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    I am developing a VC++ MFC SDI Project. I have to use a bunch of functions from a dll/lib which is provided by the hardware provider (I have to use an external usb hardware).
    In the source code provided I have a dll file, a lib file, and a folder with a bunch of include (.h ) files.

    I first added the dll and lib in the project folder. I added the lib file in the project. and used
    extern "C" __declspec(dllimport)
    to get the functions in my project, but it did not help. The project compiles properly, but apparently the functions don't do the tricks that they are supposed to do.

    Then I added and included the header files provided, and had to remove the dllimport (since it gave error 'overloaded functions' (the header files had declaration of functions). It compiled well, but still the functions don't do the trick.

    I don't know what the problem is. It does not give any errors, but the functions don't do what they are supposed to do, when they are called.
    I would be really glad if someone could help.
     

Share This Page