hell,
I did the following,
1) dlltool --input-def MYDLL2.def --dllname
MYDLL2.dll --output-lib libMYDLL2.a -k
2) ranlibMYDLL2
3) mkoctfile
TWUsetUserAgent.cc -LC:\Programme\Octave -lMyDLL2
it succeeds.
Best Regards
--- Ronan Scaife <address@hidden> schrieb am Mi, 21.1.2009:
Von: Ronan Scaife <address@hidden> Betreff: Re: mkoctfile problem An: "Michael Goffioul" <address@hidden> CC: address@hidden, address@hidden Datum: Mittwoch, 21. Januar 2009, 14:31
Dear all,
many years ago I faced the same problem with one particular MSVC DLL; for the "dlportio" universal driver shim, but found out how to do it with essentially any MSVC dll and MinGW32 C code.
The short version; mingw32 certainly *used* to be able to take a MSVC-compiled dll and work out how to link to it *without* needing an import library.
The www page I created to describe it is (sorry!) a bit out of date, but may still be
useful:
<http://elm.eeng.dcu.ie/~scaifer/win2k-dlportio-mingw/DLPORTIOandWIN2KandMinGW32.html>
Best Wishes,
Michael Goffioul wrote: > On Wed, Jan 21, 2009 at 10:52 AM, Allahyari Rahim <address@hidden> wrote: >> hello, >> >> In my directory "C:\CPLUSPLUS\MyDLL2\Debug" subsist all this files >> >> >> >> MyDLL2.obj >> >> MyDLL2.dll >> >> MyDLL2.lib > > So basically, you want to mix MSVC and MinGW compiled code. As long > as it's C code and it's not using __stdcall calling convention, this > should be fine. > However, I'm not sure that MinGW can deal directly with import lib files > generated by MSVC. What you can try is > > mkoctfile -c TWUsetUserAgent.cc > mkoctfile -o TWUsetUserAgent.oct TWUsetUserAgent.o >
C:/CPLUSPLUS/MyDLL2/Debug/MyDLL2.lib > > Michael.
-- == Dr. Ronan Scaife =============== address@hidden ========== RINCE (Research Inst. for Networks and Communications Engineering), School of Elec Eng, Dublin City University, Dublin 9, IRELAND. http://www.eeng.dcu.ie/~scaifer/ phone (office): +353-1-700-5434 phone (lab): +353-1-700-7623 fax: +353-1-700-5508 ====================================================================
|