On Fri, Aug 22, 2008 at 10:49 AM, Hiroaki Kawashima <[EMAIL PROTECTED]> 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 &)" (
> [EMAIL PROTECTED]@@A
> [EMAIL PROTECTED]@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.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to