help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] GSL using a Makefile


From: Viswakula, Sameera D.
Subject: Re: [Help-gsl] GSL using a Makefile
Date: Fri, 11 Oct 2013 16:56:34 +0000

Thanks Rhys for your quick response. I tried your approach but unfortunately it 
doesn't work.

I think the problem is my C++ project uses some of the headers and source files 
which are in the saved in my working directory. Therefore, I am getting bunch 
of errors saying that namespaces are wrong and some member functions are not 
declared.  

What should I do? 

Thanks,

-----Original Message-----
From: Rhys Ulerich [mailto:address@hidden 
Sent: Friday, October 11, 2013 12:39 PM
To: Viswakula, Sameera D.
Cc: address@hidden
Subject: Re: [Help-gsl] GSL using a Makefile

> I found out that I can compile and link using the following commands.
>
>         gcc -Wall -I/home/svisw002/gsl/include -c vsd_nb.t.cpp
>         gcc -L/home/svisw002/home/gsl/lib vsd_nb.t.o -lgsl -lgslcblas 
> -lm

The 'gsl-config' binary that GSL installs can make retrieving those values 
quite easy for Makefiles.  See below.

> vsd_nbPoi : *.cpp *.h
>         g++ -w -O4 -I ./ -o vsd_nbPoi *.cpp

Try
    g++ -w -O4 `gsl-config --cflags` -o vsd_nbPoi *.cpp `gsl-config --libs` 
where those are backticks around the gsl-config bits and I've removed your '-I 
./' option as I suspect it accomplishes nothing (the compiler should look for 
includes in the local directory).

Hope that helps,
Rhys


--
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

NOTE: This message was trained as non-spam.  If this is wrong, please correct 
the training as soon as possible.

Teach CanIt if this mail (ID 01KzQDkMl) is spam:
Spam:        
https://www.spamtrap.odu.edu/canit/b.php?i=01KzQDkMl&m=0a5ecf8579aa&t=20131011&c=s
Not spam:    
https://www.spamtrap.odu.edu/canit/b.php?i=01KzQDkMl&m=0a5ecf8579aa&t=20131011&c=n
Forget vote: 
https://www.spamtrap.odu.edu/canit/b.php?i=01KzQDkMl&m=0a5ecf8579aa&t=20131011&c=f
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS




reply via email to

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