forum.alglib.net
http://forum.alglib.net/

new to ALGLIB
http://forum.alglib.net/viewtopic.php?f=2&t=383
Page 1 of 1

Author:  ElCattivo [ Thu Jun 09, 2011 1:09 pm ]
Post subject:  new to ALGLIB

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.

Author:  Sergey.Bochkanov [ Fri Jun 10, 2011 8:34 am ]
Post subject:  Re: new to ALGLIB

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.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/