CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    15

    Question How to use a VisualC++/MFC-LIB in Borland?

    Is it possible to include in Borland C++ a LIB from VisualC++/MFC?
    (...or is it possible to make a option in VisualC++, so that the generated LIB can be used in Borland?)

    Thanks
    Thommy

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449
    What kind of "LIB" file? You have import libraries (the library that's created when you build a DLL), and a static library (this is just a library of object code). If either one of them was created by VC++, they cannot be used directly in a Borland project. However, you can create a Borland compatible "LIB" file, if the library was an import library and you know the name of the DLL that was created. A static library, however, is a much tougher problem.

    If you want to include an *import* library in Borland, use the IMPLIB.EXE program that comes with the Borland compiler. IMPLIB creates a Borland compatible import lib file, given the name of the DLL. Just specify the library name you want to create, and the DLL that you are creating the import library for. Type in IMPLIB at the command prompt to see what options are available (assuming you have your path set to the Borland BIN directory).

    If you want to use a *static* library, you have no choice but to recompile the entire source code that made up the static library using Borland's compiler. You can't mix a VC++ obj file with a Borland project, so therefore a static library created with VC++ cannot be used in a Borland project. Therefore, you must have the original source code that was used to make the static library, or else you're out of luck.

    Regards,

    Paul McKenzie

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured