Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » error with gsl eclipse (even simple code does not excuted.)
error with gsl eclipse [message #497917] Fri, 13 November 2009 14:48 Go to next message
yaseen  is currently offline yaseen Friend
Messages: 9
Registered: September 2009
Junior Member
Hi...


I tried to run the following simple program in C++ in Eclipse (with CDT), using the GNU Scientific Library:
#include <iostream>
#include<conio.h>
#include<cmath>
#include <gsl/gsl_statistics.h>
using namespace std;

int main()
{

double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6};
double mean;
mean = gsl_stats_mean(data, 1, 5);

cout<< mean <<endl;

return 0;
}

I've indicated the include directory and linked the libraries relevant to GSL.

I got the error:
**** Internal Builder is used for build ****
g++ -IC:\Program Files\eclipse\GnuWin32\include -O0 -g3 -Wall -c -fmessage-length=0 -osrc\reg.o ..\src\reg.cpp
g++ -LC:\Program Files\eclipse\GnuWin32\lib -oreg.exe src\reg.o -lgsl
g++: Files\eclipse\GnuWin32\lib: No such file or directory
Build error occurred, build is stopped
Time consumed: 625 ms.
any help please....!!!??
Re: error with gsl eclipse [message #497965 is a reply to message #497917] Fri, 13 November 2009 14:52 Go to previous messageGo to next message
Derek is currently offline DerekFriend
Messages: 60
Registered: July 2009
Member
On 13/11/2009 14:48, yaseen wrote:
> Hi...
>
>
> I tried to run the following simple program in C++ in Eclipse (with
> CDT), using the GNU Scientific Library:
> #include <iostream>
> #include<conio.h>
> #include<cmath>
> #include <gsl/gsl_statistics.h>
> using namespace std;
>
> int main()
> {
>
> double data[5] = {17.2, 18.1, 16.5, 18.3, 12.6};
> double mean;
> mean = gsl_stats_mean(data, 1, 5);
>
> cout<< mean <<endl;
>
> return 0;
> }
>
> I've indicated the include directory and linked the libraries relevant
> to GSL.
>
> I got the error:
> **** Internal Builder is used for build ****
> g++ -IC:\Program Files\eclipse\GnuWin32\include -O0 -g3 -Wall -c
> -fmessage-length=0 -osrc\reg.o ..\src\reg.cpp
> g++ -LC:\Program Files\eclipse\GnuWin32\lib -oreg.exe src\reg.o -lgsl
> g++: Files\eclipse\GnuWin32\lib: No such file or directory
> Build error occurred, build is stopped
> Time consumed: 625 ms. any help please....!!!??
>
Surround the path in quotes:
g++ -L"C:\Program Files\eclipse\GnuWin32\lib" -oreg.exe src\reg.o -lgsl


--
Derek
Re: error with gsl eclipse [message #497967 is a reply to message #497965] Fri, 13 November 2009 15:15 Go to previous messageGo to next message
yaseen  is currently offline yaseen Friend
Messages: 9
Registered: September 2009
Junior Member
Thank you for this fast replay
it is solved....the path directory was wrong.
thanks again.

[Updated on: Fri, 13 November 2009 15:38]

Report message to a moderator

Re: error with gsl eclipse [message #497988 is a reply to message #497967] Fri, 13 November 2009 15:39 Go to previous message
Derek is currently offline DerekFriend
Messages: 60
Registered: July 2009
Member
On 13/11/2009 15:15, yaseen wrote:
> Thank you for this fast replay but i already have this path and it is
> correct. could you give me more advice please....
> thanks in advance
I told you. If the path contains spaces, it *must* be surrounded in
quotes. This applies to anything you do in Windows, not just Eclipse.

--
Derek
Previous Topic:Class definition
Next Topic:Re: Lua DLL
Goto Forum:
  


Current Time: Fri Dec 19 00:00:46 GMT 2014

Powered by FUDForum. Page generated in 0.01920 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software