Code::Blocks Forums

User forums => Help => Topic started by: chrishowarth on May 05, 2007, 11:41:14 am

Title: Why won't this DLL work? :(
Post by: chrishowarth 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?
Title: Re: Why won't this DLL work? :(
Post by: k2dave 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.
Title: Re: Why won't this DLL work? :(
Post by: chrishowarth 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?
Title: Re: Why won't this DLL work? :(
Post by: raph on May 05, 2007, 03:48:36 pm
If you know how the function is declared, you may also declare it yourself.