Using .exe files as libraries
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Using .exe files as libraries

  1. #1
    Join Date
    Aug 2006
    Posts
    98

    Using .exe files as libraries

    Hello,

    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.....

    Thanks!

    Ejohns85

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,359

    Re: Using .exe files as libraries

    Contact the supplier of the library. Perhaps they posted the wrong binary.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center