[mlpack] Introduction GSoc 2018

Evgeny Freyman evg.freyman at gmail.com
Sun Dec 10 14:59:33 EST 2017


Seems that it still can't find the libmlpack.so. Try calling this before
building (check that there is a mlpack library at specified path)

export LD_LIBRARY_PATH="/usr/local/lib/:$LD_LIBRARY_PATH"

Another option is to specify location of library thorough -L parameter (g++
.... -L/usr/local/lib/,
https://stackoverflow.com/questions/6141147/how-do-i-include-a-path-to-libraries-in-g
)

Could this help?

P.S. It's better to answer all for history and for others to see/comment

Eugene


вс, 10 дек. 2017 г. в 20:32, Rahul Barnwal <rahulbarnwal70 at gmail.com>:

> Hi Eugene,
>
> Thank you for the help. I am using all the dependencies mentioned to avoid
> any further unresolved reference problems. But the command
>
> g++ -std=c++11 cov.cpp -lmlpack -larmadillo -lboost_serialization
> -lboost_program_options -lboost_unit_test_framework
>
> gives
>
> /tmp/cc8qLLm3.o: In function `main':
> cov.cpp:(.text+0x3aa): undefined reference to `bool
> mlpack::data::Load<double>(std::__cxx11::basic_string<char,
> std::char_traits<char>, std::allocator<char> > const&, arma::Mat<double>&,
> bool, bool)'
> collect2: error: ld returned 1 exit status
>
> How to remove this unresolved reference problem. Am i missing any other
> dependencies ?
> Once again, thank you for the suggestions.
>
> Regards
> Rahul
>
>
>
>
>
>
>>
> On Sun, Dec 10, 2017 at 9:53 PM, Evgeny Freyman <evg.freyman at gmail.com>
> wrote:
>
>> Hi Rahul,
>>
>> Just getting started with MLPack myself and had the similar problem. The
>> solution is:
>>
>> 1. As far as I know gcc is for C and g++ is for C++ language, so you need
>> to use g++
>> 2. You didn't specify dependencies, thats why you got lots of unresolved
>> references. The proper way to compile your code is:
>>
>> g++ -std=c++11 cov.cpp -lmlpack -larmadillo -lboost_serialization
>> -lboost_program_options -lboost_unit_test_framework
>>
>> granted that you installed MLPack (ran "make install" command from the
>> instructions). Some of those Boost's dependencies may be redundant here, it
>> depends on what you use in your code.
>>
>> Be careful to specify your source files before list of dependencies.
>> Thanks *rcurtin *for clarification.
>>
>> All the best
>> Eugene Freyman
>>
>>
>> вс, 10 дек. 2017 г. в 16:46, Rahul Barnwal <rahulbarnwal70 at gmail.com>:
>>
>>> Hi,
>>> I am a fourth year undergraduate student at Indian Institute of
>>> Technology, Kharagpur, India. I am interested in contributing to mlpack
>>> library. I am new to open source field and want to explore it in area of
>>> interest and hence, mlpack.
>>>
>>> Following the instructions given on *contributing to mlpack* page, i
>>> have compiled it from the source and have also tried some of the simple
>>> command line executables like mlpack_linear_regression.  But while
>>> implementing simple mlpack programs, i am stuck.
>>> i gave this command:
>>>  gcc -std=c++11 cov.cpp
>>> But got this error instead,  *https://pastebin.com/cb8aKRKf
>>> <https://mailtrack.io/trace/link/aa4186a14bd5ea98db5cb1302cd7c524b327995d?url=https%3A%2F%2Fpastebin.com%2Fcb8aKRKf&userId=745499&signature=973c07ac0f48d176>*
>>>  Could you please let me know what is wrong here ?
>>>
>>>
>>> --
>>> Regards,
>>> Rahul Barnwal
>>> 4th year Undergraduate
>>> Mathematics Department
>>> IIT KHARAGPUR
>>>
>>>
>>>
>>>>>> <https://mailtrack.io/> Sent with Mailtrack
>>> <https://mailtrack.io/trace/link/6cdc2a24610904808549765546956c51be1a7c26?url=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fmailtrack-for-gmail-inbox%2Fndnaehgpjlnokgebbaldlmgkapkpjkkb%3Futm_source%3Dgmail%26utm_medium%3Dsignature%26utm_campaign%3Dsignaturevirality&userId=745499&signature=802761eb4240c367>
>>> _______________________________________________
>>> mlpack mailing list
>>> mlpack at lists.mlpack.org
>>> http://knife.lugatgt.org/cgi-bin/mailman/listinfo/mlpack
>>> <https://mailtrack.io/trace/link/787b09c92813b4e49294384b68ed2d92cdf79cd5?url=http%3A%2F%2Fknife.lugatgt.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fmlpack&userId=745499&signature=f27e1a0d748130bc>
>>
>>
>
>
> --
> Regards,
> Rahul Barnwal
> 4th year Undergraduate
> Mathematics Department
> IIT KHARAGPUR
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://knife.lugatgt.org/pipermail/mlpack/attachments/20171210/7ed695b8/attachment.html>


More information about the mlpack mailing list