octave-maintainers
[Top][All Lists]
Advanced

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

Re: [OctDev] MSVC (VS2005) mkoctfile linking problem (DiagMatrix operato


From: Michael Goffioul
Subject: Re: [OctDev] MSVC (VS2005) mkoctfile linking problem (DiagMatrix operator *)
Date: Fri, 22 Aug 2008 11:29:56 +0200

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.


reply via email to

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