Menu

compilation with VC7

tti
2005-10-27
2013-04-29
  • tti

    tti - 2005-10-27

    I tried to compile a simple example written in the documant:
    http://cpplapack.sourceforge.net/tutorial/japanese/node2.html

    But failed to compile. Between the many, many warning, there are several erros.

    d:\cpplapack\include\dgematrix-\dgematrix-misc.hpp(163) : error C2061: syntax error: 'A'
    d:\cpplapack\include\dgematrix-\dgematrix-misc.hpp(165) : error C2440: '=' : 'double ** unable to convert from (__cdecl *)(void) ' to 'double ** '

    My compiler is VC7 and I would like to use the MKL7.21.

    Example--------------------
    //====================================================================[include]
    #include ``cpplapack.h''

    //=======================================================================[main]
    /*! main */
    int main(int argc, char** argv)
    {
      //// make dgematrix A  ////
      CPPL::dgematrix A(3,3);
      A(0,0)=1;  A(0,1)=1;  A(0,2)=-2;
      A(1,0)=-3; A(1,1)=2;  A(1,2)=1;
      A(2,0)=3;  A(2,1)=-1; A(2,2)=2;

      //// make dcovector y ////
      CPPL::dcovector y(3);
      y(0)=1;
      y(1)=2;
      y(2)=3;

      //// solve Ax=y ////
      A.dgesv(y);

      //// print ////
      std::cout << ``x=\n'' << y << std::endl;

      return 0;
    }

     
    • Yuki Onishi

      Yuki Onishi - 2005-11-29

      >d:\cpplapack\include\dgematrix-\dgematrix-misc.hpp(163):error C2061: syntax error: 'A'
      This is because of the bug of VC7.
      However, you can compile CPPLapack programs with a few slight modifications.

      Change the "swap" functions in "*-misc.hpp" like the following.

      double** A_darray(A.Darray);
      ==> double** A_darray=A.Darray;

       
    • Nobody/Anonymous

      This also happens with MSVC++ 8.0. Thanks for the fix.

       
      • Yuki Onishi

        Yuki Onishi - 2008-02-07

        This problem has already been fixed at svn repository.
        Please check the following URL. Thank you.
        https://sourceforge.net/svn/?group_id=78519

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.