forum.alglib.net http://forum.alglib.net/ |
|
Impoting ALGLIB to C++ http://forum.alglib.net/viewtopic.php?f=2&t=584 |
Page 1 of 1 |
Author: | monipeny [ Wed May 30, 2012 1:36 pm ] |
Post subject: | Impoting ALGLIB to C++ |
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. |
Author: | Sergey.Bochkanov [ Thu May 31, 2012 10:28 am ] |
Post subject: | Re: Impoting ALGLIB to C++ |
You should put all ALGLIB .cpp and .h files into same directory as main.cpp, and execute Code: g++ *.cpp -o main
|
Author: | monipeny [ Fri Jun 01, 2012 10:49 am ] |
Post subject: | Re: Impoting ALGLIB to C++ |
Thank you so much. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |