Menu

problem about gsl_matrix_view_array

Help
Xie Yi
2010-05-07
2012-07-26
  • Xie Yi

    Xie Yi - 2010-05-07

    Why the GSL code compiled on VS2005 get runtime error every time.

    #include <cstdlib>
    extern "C" {
    #include <gsl/gsl_matrix.h>
    }
    using namespace std;
    
    int main()
    {
            double data[9]={1,2,3,4,5,6,7,8,9};
            for(int i = 0 ; i < 100 ; i++) {
                  gsl_matrix_view m = gsl_matrix_view_array(data,3,3);
            }
            return EXIT_SUCCESS;
    }
    

    I have set the runtime check to default which ensure the error about ESP won't
    happen. So the outcome should be attributed to other problems. Thanks for any
    suggestion.

     
  • GnuWin

    GnuWin - 2010-05-09

    Did you compile with the switch GSL_DLL on?

     
  • Xie Yi

    Xie Yi - 2010-05-10

    When I compiled the program with GSL_DLL on. The Visual Studio 05 complained
    that "__imp_gsl_matrix_submatrix" and "__imp_gsl_matrix_view_array" couldn't
    be found, which didn't happen without GSL_DLL switch. I think program with GSL
    on Windows is too tricky. Is there any complete compling guidance?

     
MongoDB Logo MongoDB