Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

VIsual Studio 2005

Help
2006-04-18
2013-04-16
  • I am tiring to compile OpenPNL with Visual Studio 2005.
    However, I met the following error message.

    pnlBKInferenceEngine.cpp
    ..\src\pnlBKInferenceEngine.cpp(456) : error C2440: can not covert '<function-style-cast>' : 'int' to 'std::_Vector_iterator<_Ty,_Alloc>'
            with
            [
                _Ty=pnl::CDistribFun *,
                _Alloc=pnl::GeneralAllocator<pnl::CDistribFun *>
            ]

    It is seem to resolve this problem by replacing

    pnlBKInferenceEngine.cpp(456):
    distrPVector::iterator sepIt = distrPVector::iterator(0);

    to

    distrPVector::iterator sepIt = distrPVector::iterator();

    but, I am not sure it is correct.
    I am appricate any addvice.

     
    • Denver Dash
      Denver Dash
      2006-04-24

      I've never encountered anyone who has tried to compile with VS2005, so there are likely to be a few issues with standard compatability. Probably your version is more up-to-date with the standards.

      If that't the only error you're encountering, I would try to explicitely cast the 0 into a 'std::_Vector_iterator' type (possibly with the template arguments listed, but maybe not neccessary?).

      Let us know if that fixes the problem, or if you find some other fix.

      Denver.

       
    • I successfully compile PNL with VS2005
      I up the modified PNL to
      http://www2s.biglobe.ne.jp/~niitsuma/STLLCV/PNL_VS05.lzh

       
    • >Let us know if that fixes the problem, or if you find some other fix.

      Yes that is alomot all of the fix.

       
    • n71154
      n71154
      2006-12-23

      can you upload file again
      plz
      i will deeply appreciated

       
      • ahamino
        ahamino
        2007-07-09

        niitsuma, I tried to compile the file you uploaded but I failed.

        The PNL project compilation finishes successfully but all the other projects (test things) give errors:

        pnl_vs05_0_1\c_pgmtk\include\pnlMatrix.hpp(182) : error C2491: 'pnl::CMatrix<Type>::GetMatrixClass' : definition of dllimport function not allowed

        PNL_VS05_0_1\c_pgmtk\src\include\pnli2DNumericDenseMatrix.hpp(390) : error C2491: 'pnl::iC2DNumericDenseMatrix<Type>::IsIllConditioned' : definition of dllimport function not allowed

        which what happens also when i include the library in my project?

        can you please advice
        ahamino

         
        • Hruod
          Hruod
          2007-08-21

          I´ve got the same error like ahamino

          pnl_vs05_0_1\c_pgmtk\include\pnlMatrix.hpp(182) : error C2491: 'pnl::CMatrix<Type>::GetMatrixClass' : definition of dllimport function not allowed

          Does anyone have a solution ?

          Thanks

           
    • rukawa08
      rukawa08
      2007-02-01

      Is the modified PNL a patch on a stand alone complete working PNL release?