Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using third party libraries in c++

Status
Not open for further replies.

philrosenberg

Technical User
Dec 3, 2003
15
0
0
GB
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
Phil
 
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.
 
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...
 
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.
 
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...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top