help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mkoctfile problem


From: Allahyari Rahim
Subject: Re: mkoctfile problem
Date: Wed, 21 Jan 2009 10:52:37 +0000 (GMT)

hello,

In my directory  “C:\CPLUSPLUS\MyDLL2\Debug”  subsist all this files

 

MyDLL2.obj

MyDLL2.dll

MyDLL2.lib

…..

 

I use mkoctfile TWUsetUserAgent.cc  “C:\CPLUSPLUS\MyDLL2\Debug


thanks

--- Michael Goffioul <address@hidden> schrieb am Mi, 21.1.2009:
Von: Michael Goffioul <address@hidden>
Betreff: Re: mkoctfile problem
An: address@hidden
CC: address@hidden
Datum: Mittwoch, 21. Januar 2009, 10:47

On Wed, Jan 21, 2009 at 7:59 AM, Allahyari Rahim <address@hidden> wrote:
> Hello
>
>
>
> I checked my MyDLL2.dll with matlab.
>
>
>
> myPath = 'C:\CPLUSPLUS\MyDLL2\Debug';
>
> hfile = 'C:\CPLUSPLUS\MyDLL2\MyDLL2.h';
>
>
>
> loadlibrary([myPath '/MyDLL2'],hfile);
>
> Agent=calllib('MyDLL2','TWUsetUserAgent','Hello');
>
> sprintf('User: (%-s)', Agent)
>
> unloadlibrary('MyDLL2');
>
>
>
> dll is ok.
>
>
>
>>> userAgent
>
>
>
> ans =
>
>
>
> User: (Hello)
>
>
>
> And to check on octave 3..0.2
>
> I renamed mydll2.dll to mydll2.dll.a to check my command

No, no, no, no. You don't understand. An import library file is
NOT the same as a DLL. They are both different files, but they
are bound together. I stated this several time: besides your
DLL, you NEED an import library file. This import lib file will tell
mkoctfile what are the symbols available in the DLL and where
to find them.

How do you compile mydll2.dll?

Switching to 3.0.3 won't help you further. The concept of
DLL/import-lib duality is the same. This is the way it works under
Windows, whether you use MSVC or MinGW as compiler.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]