Solved

Why LINK.EXE does not generate proper lib & exp files?

Posted on 1998-07-30
3
320 Views
Last Modified: 2013-11-19
My platform is MSVC++ and have a frontend. One of our DLL (backend) is created in Borland C++. We asked the programmers to give the library file of the DLL so that we can link with our front end. But during linking we get an error 'aaa.lib - file is invalid or corrupted.'. So I decided to create the lib file from the Dll by using LIB application which came with MSVC++. The command I used is LIB /DEF:AAA.DLL. It created a lib file and an exp file. But it does not have any information. I mean exported functions. So while linking the frontend application is giving unresolved externals. How can I create a lib/exp file so that it does have all exported functions? Am I missing any command line parameter here? Mine is a 32 bit system.
0
Comment
Question by:chacko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Expert Comment

by:galkin
ID: 1319936
Borland and Microsoft linkers generate different lib files. The problem is name mangling that is different for these linkers. If you want to use borland DLL with MFC EXE you can only export global functions and variable declaring then as extern "C" to avoid name mangling.
0
 
LVL 1

Author Comment

by:chacko
ID: 1319937
Galkin,

Thanx for the answer. But I was expecting something more than that. All the functions are in C only. But I was not not able to create the import library file. I solved the problem this way. I created a module definition file with all the functions I wanted to import. Then I used command LIB /DEF:aaa.def which created the import library file. We can get a list of the functions which are exported with the application DUMPBIN /EXPORTS aaa.dll.

with thanks
Varghese
0
 
LVL 23

Accepted Solution

by:
chensu earned 100 total points
ID: 1319938
How to Create 32-bit Import Libraries Without .OBJs or Source
http://support.microsoft.com/support/kb/articles/q131/3/13.asp 

And Implib32 makes it easier.

Implib32
http://www.geocities.com/SiliconValley/5806/

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
not able to insert into temp table 68 179
Separate files macro - Errors on larger data set 18 76
viewing source code from eclipse 13 111
has77  challenge 9 105
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question