forum.alglib.net http://forum.alglib.net/ |
|
Getting Started http://forum.alglib.net/viewtopic.php?f=2&t=67 |
Page 1 of 1 |
Author: | amccorm [ Mon Sep 27, 2010 3:50 pm ] |
Post subject: | Getting Started |
Hi, First off, I want to say that ALGLIB looks awesome. My initial use of it will be to write faster versions of some algorithms I have made in MATLAB. Unfortunately, I'm having some trouble getting started. I've got everything unpacked and installed fine it seems. Here's the short version of my trial code: #include "linalg.h" int main(int argc, char* argv[]){ alglib::ae_int_t m; //aglib::real_2d_array a; } The code compiles with the comments in place, but crashes with this message if it is taken out: Andy@Andy-PC /cygdrive/f/workarea/c $ g++ -o foo matTesting.cpp /tmp/ccYzDFnJ.o:matTesting.cpp:(.text+0x145): undefined reference to `alglib::re al_2d_array::real_2d_array()' /tmp/ccYzDFnJ.o:matTesting.cpp:(.text+0x150): undefined reference to `alglib::re al_2d_array::~real_2d_array()' collect2: ld returned 1 exit status I'm not very good at C++, so I'm probably missing something obvious. Anyone have a solution? More generally, does anyone have some simple examples so I can get the imports/syntax correct? Thanks, Andy |
Author: | Sergey.Bochkanov [ Mon Sep 27, 2010 4:41 pm ] |
Post subject: | Re: Getting Started |
Looks like you haven't added ap.cpp and other .cpp files from src directory to your project. If you want to use linalg.h, you need ap.cpp, alglibinternal.cpp, alglibmisc.cpp and linalg.cpp (which depends on previous ones). Does it help? |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |