Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

using third party libraries in c++

using third party libraries in c++

using third party libraries in c++

Hi all
I'm trying to use a third party library I have been provided with. The libraty comes as a .dll and a .lib, but there is no header file.
I don't regularly use third party stuff so I'm a little sktechy on how to do it. Is it possible without a header file?
I'm not sure what the library was written in but I have a feeling it was fortran. Does this make any difference?

Cheers for any help

RE: using third party libraries in c++

The calling convention may be different.  In C/C++ the the caller pushes the parameters into the stack and pops them off.  Fortran/Pascal the caller pushes the parameters into the stack but the callee pops them off.

If you define a routine as extern PASCAL, it will follow the second convention.

RE: using third party libraries in c++

Can you explain using third party library if you don't know its functions signatures (names and parameters types)?
If you know, you may write function prototypes and place them into your own header file...

RE: using third party libraries in c++

I have a manual for use of the functions which includes function names and parameters, but does not specify return types or parameter types. The dll also comes with functionality for use in excel spreadsheets which is what the manual focusses on.
Perhaps I'll give it a go writing my own definitions and see if it works.

RE: using third party libraries in c++

Try to #import this dll in C++ module (MS specific extension). May be the library has some info to built include files with interfaces for MS C++. As usually, MS Office automation libraries have this info...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close