[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OctDev] MSVC (VS2005) mkoctfile linking problem (DiagMatrix operato
From: |
Hiroaki Kawashima |
Subject: |
Re: [OctDev] MSVC (VS2005) mkoctfile linking problem (DiagMatrix operator *) |
Date: |
Sun, 24 Aug 2008 09:22:19 +0900 |
Michael, thank you very much for your comment.
John, I would really appreciate if you could make the
change when you get a chance as I often
use the operator.
Thanks,
Hiro
On Fri, 22 Aug 2008 11:29:56 +0200
"Michael Goffioul" <address@hidden> wrote:
> On Fri, Aug 22, 2008 at 10:49 AM, Hiroaki Kawashima <address@hidden> wrote:
> > Hi,
> >
> > I've started using mkoctfile-3.0.1 with MSVC and found that the following
> > code could not be linked with octave.lib.
> >
> > // diagtest.cpp
> > #include <iostream>
> > #include <octave/oct.h>
> > int main()
> > {
> > DiagMatrix a(2,2, 2.0), b(2,2, 3.0), c;
> > c = a*b;
> > std::cerr << c << std::endl;
> > return 0;
> > }
> >
> > ---- version of octave ----
> > octave-3.0.1-setup.exe (windows installer) from sourceforge.net
> >
> > ---- compilation batch file ----
> > call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
> > "C:\Program Files\Octave\bin\mkoctfile" --link-stand-alone diagtest.cpp -o
> > diagtest.exe
> >
> > ---- error message at linking ----
> > diagtest.o : error LNK2019: unresolved external symbol "class DiagMatrix
> > __cdecl opera
> > tor*(class DiagMatrix const &,class DiagMatrix const &)" (
> > address@hidden@@A
> > address@hidden@Z) ...
> > I guess the reason might be that ' operator * () ' is not exported since
> > 'extern OCTAVE_API'
> > is not added to the prototype in dDiagMatrix.h.
> > Could someone please give me an advice whether this is bug or just a
> > specification of the API?
>
> There's no API specification yet. The reason is simply that the class
> is not decorated with OCTAVE_API (the reason being I never needed
> it). John, could you consider making the change?
>
> Michael.