forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 4:10 am

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: Getting Started
PostPosted: Mon Sep 27, 2010 3:50 pm 
Offline

Joined: Mon Sep 27, 2010 3:30 pm
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: Getting Started
PostPosted: Mon Sep 27, 2010 4:41 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
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?


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 12 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