help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] problem


From: Steven Vancoillie
Subject: Re: [Help-gsl] problem
Date: Fri, 24 Oct 2008 14:30:38 +0200
User-agent: KMail/1.9.9

On Thursday 23 October 2008 21:07:28 kerem cosar wrote:
> ok sorry, I don't know the conventions in this community. The command is
> 
> CC -I/gsl/include -L/gsl/lib -lgsl -lgslcblas -lm file.c -o file
> 
> and the code is
> 
> #include <iostream>
> #include <fstream>
> #include <gsl/gsl_matrix.h>
> #define DIM 10
> using namespace std;
> 
> int main()
> {     int i,j;
>      gsl_matrix *wage = gsl_matrix_alloc(DIM,DIM);
> 
>             for(i = 0; i < DIM; i++)
>                 for(j = 0; j < DIM; j++)
>                      {
>                          gsl_matrix_set(wage,i,j,0);
>                 }
>  return 0;
> }
> 

your code is in fact C++ code, so I would say you need to use g++ or some other 
C++ compiler

g++ -I/gsl/include -L/gsl/lib -lgsl -lgslcblas -lm file.c -o file

(i would not name a C++ file with the ".c" extension if I were you though, use 
".cpp" or something)

grtz
Steven

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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