August 6th, 2009, 01:06 PM
Using .exe files as libraries
I am writing a program in C++ with Visual Studio 2008, and I want to use a library that has been written by somebody else. I'm not all that familiar with using libraries, so I'm wondering if somebody could help.
I have had some success before using a library - I downloaded it from the author's website, and it gave me a .lib, .cpp and .h file. I think the .cpp file was just an example implementation of the code. I "included" the .h file into my code, and added the .lib file to my project using the Visual Studio settings, and all was fine.
However, I am now trying to use a difference library. This time, when I downloaded it, it gave me a .cpp and .h file, as before, but instead of a .lib file, it gave me a .exe file...
When I tried to link to this as before, it gave me the error message:
"fatal error LNK1107: invalid or corrupt file: cannot read at 0x288"
Why have I been given a .exe file rather than a .lib file? I tried to run the .exe file, and it brought up a console window, but nothing happened.
I'm a little confused as to the difference between .exe and .lib here, and how I can use the .exe file as a library, to use its classes and functions.....
August 6th, 2009, 02:58 PM
Re: Using .exe files as libraries
Contact the supplier of the library. Perhaps they posted the wrong binary.
Click Here to Expand Forum to Full Width