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

Using alglib as a (shared) library
http://forum.alglib.net/viewtopic.php?f=2&t=134
Page 1 of 1

Author:  Vela [ Mon Dec 06, 2010 3:20 pm ]
Post subject:  Using alglib as a (shared) library

Hi,
I'm a newbie in c++ so excuse any stupid questions.
I don't use any programming environment like eclipse, but only a text editor and a shell. So even if I just use one of the alglib_specialfunctions I end up first compiling then linking 4 (or more) files. I read about making shared objects out of all alglib-files, but I need a step by step explanation of how to do this. Or is there another possibility to install alglib "properly" like for example the blitz-library.
At the end I would like to be able to link with a flag like
Code:
g++ ..... -lalglib


Thank you very much for your help!

-Vela

Author:  Sergey.Bochkanov [ Mon Dec 06, 2010 6:42 pm ]
Post subject:  Re: Using alglib as a (shared) library

Current version of ALGLIB does not include built-in support for shared library creation, so you have to build shared lib yourself. I can recommend you to use libtool, which allows to create portable and installable shared libraries.

Author:  Vela [ Tue Dec 07, 2010 1:40 pm ]
Post subject:  Re: Using alglib as a (shared) library

Thanks, I will give it a try. One more question; if I have successfully installed alglib as a shared library, how do I include the right header files?
So far I did it with
Code:
#include "interpolation.h"

but then the compiler looks in the same directory, right?
Is there something like a "big header file", like #inlcude <alglib.h>, or do I have to supply the directory while linking using the -L flag?

Thanks for your help!

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