Author Topic: Why won't this DLL work? :(  (Read 3173 times)

chrishowarth

  • Guest
Why won't this DLL work? :(
« on: May 05, 2007, 11:41:14 am »
Hi ~

I downloaded a DLL recently for use in my project.  I know it works, because I've used it before (but not in C++).  It was written in C++.  I've added the .lib to my project (I went to Project -> Build Options -> Linker -> Add?), and I was told that I didn't have to do any more.  Well, I tried to use a function (i.e. without declaring because the DLL declares it) and I got the error "'hobbel_com_open' undeclared (first use this function)".   Why is this?  What am I doing wrong?

Offline k2dave

  • Single posting newcomer
  • *
  • Posts: 9
Re: Why won't this DLL work? :(
« Reply #1 on: May 05, 2007, 12:26:08 pm »
You must include the header file declaring the function.
The .lib file isn't seen by the compiler - so your function isn't declared when you compile - just as it reported.

chrishowarth

  • Guest
Re: Why won't this DLL work? :(
« Reply #2 on: May 05, 2007, 01:59:20 pm »
Oh I must have been mis-informed.  I do not have a header file... does this mean that I must load dynamically?

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: Why won't this DLL work? :(
« Reply #3 on: May 05, 2007, 03:48:36 pm »
If you know how the function is declared, you may also declare it yourself.