forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 6:22 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: new to ALGLIB
PostPosted: Thu Jun 09, 2011 1:09 pm 
Offline

Joined: Thu Jun 09, 2011 12:55 pm
Posts: 1
Hi there.

I'm new here and trying to get ALGLIB started, but I have little problems. I'm sure sb can help me.
I am programming in Linux (Debian) with gcc4.4.5.
I downloaded ALGLIB and decompressed all files from the src directory.
Now I wanted to test it with a gammafcn_test.cpp, which is in the same directory:
Code:
#include<iostream>
#include "specialfunctions.h"

int main () {

   double x = 4.5;
   double y = alglib::gammafunction(x);

   std::cout << y << "\n";
   
}


But when compiling I get the following error message:
    /tmp/ccX6dNCL.o: In function `main':
    bessel_test.cpp:(.text+0x2b): undefined reference to `alglib::gammafunction(double)'
    collect2: ld returned 1 exit status

What did I wrong?
Thanks for helping.


Top
 Profile  
 
 Post subject: Re: new to ALGLIB
PostPosted: Fri Jun 10, 2011 8:34 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
You have to add all .cpp files from ALGLIB directory to your project - to compile them along with your main .cpp file. Just including header files is not enough.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group