forum.alglib.net

ALGLIB forum
It is currently Mon Dec 23, 2024 4:31 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  [ 3 posts ] 
Author Message
 Post subject: Impoting ALGLIB to C++
PostPosted: Wed May 30, 2012 1:36 pm 
Offline

Joined: Wed May 30, 2012 1:21 pm
Posts: 2
Hi everyone!

I am new using ALGLIB i hope you can help me. I am implementing a C++ program(Ubuntu) and i need to use the ttest2 function which it's included in the statistics package.

Here it's what i tried :
1. I have a main.cpp where i wrote #include "statistics.h" in the header. I create two new directories src with all the .cpp and and include with all .h. When i compile my program like this
g++ main.cpp -o main

I got this message error
main.cpp:8:24: error: statistics.h: No such file or directory

2. Put all files .h and .cpp in the same level as main.cpp and compile it as the same way as 1 then i got this message

main.cpp:(.text+0xe89): undefined reference to `alglib::boolean_1d_array::boolean_1d_array()'

int main(){
//my code
alglib::boolean_1d_array b1;
b1 = "[true]";

return 0;
}

My problem is that i don't know where put all the .cpp and header files. I read that i should compile all the .cpp along the main.cpp but i don't know how to do it.

Thank you so much for your help.


Top
 Profile  
 
 Post subject: Re: Impoting ALGLIB to C++
PostPosted: Thu May 31, 2012 10:28 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
You should put all ALGLIB .cpp and .h files into same directory as main.cpp, and execute

Code:
g++ *.cpp -o main


Top
 Profile  
 
 Post subject: Re: Impoting ALGLIB to C++
PostPosted: Fri Jun 01, 2012 10:49 am 
Offline

Joined: Wed May 30, 2012 1:21 pm
Posts: 2
Thank you so much.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 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