Re: How to generate the _imp_ prefix?

Sergio NNX <[email protected]> Wed, 22 Jan 2020 09:53:37 +0000
Newsgroups gmane.comp.gnu.mingw.user
Message-ID <DM5PR13MB13233CFF04D2FEA6568CC622CC0C0@DM5PR13MB1323.namprd13.prod.outlook.com>
Let's assume we have the import library and we want to test/link it from VS.
Let's say I have: liblmfit.a, liblmfit.dll.a and lmfit.dll files and I would like my (VS) code/program to link to this import library.
Can you provide some code snippet to demonstrate to concept or process?

> Shall we tweak MingGW to generate _imp_foo, or VS to expect _foo?
How familiar are you with VS?

________________________________
From: MinGW-Users <[email protected]> on behalf of Joachim Wuttke <j.wuttke-97/[email protected]>
Sent: Wednesday, 22 January 2020 8:25 PM
To: MinGW Users List <[email protected]>
Subject: Re: [Mingw-users] How to generate the _imp_ prefix?

Thanks for your three mails, Sergio.

   The difficulty is not in building the dependent library under MinGW.
   The difficulty is to link the resulting import library from VS.

   As for my level of experience with MinGW: Zero.

   As for the "plenty of online tutorials", I would be most grateful
   for a link to a really pertinent one.

Back to the problem:

   For a function foo(),
   MinGW generates link symbol _foo (according to dumpbin libmylib.lib)
   whereas VS expects _imp_foo.

Hence the primordial question:

   Shall we tweak MingGW to generate _imp_foo, or VS to expect _foo?

Joachim

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe