verne.freenode.net changed the topic of #mlpack to: http://www.mlpack.org/ -- We don't respond instantly... but we will respond. Give it a few minutes. Or hours. -- Channel logs: http://www.mlpack.org/irc/
mikeling has joined #mlpack
thyrix has joined #mlpack
thyrix has quit [Quit: Leaving]
UtkarshGpta has quit [Remote host closed the connection]
thyrix has joined #mlpack
thyrix has quit [Quit: Leaving]
UtkarshGpta has joined #mlpack
thyrix has joined #mlpack
UtkarshGpta has quit [Ping timeout: 268 seconds]
thyrix has quit [Quit: Leaving]
UtkarshGpta has joined #mlpack
thyrix has joined #mlpack
thyrix has quit [Max SendQ exceeded]
thyrix has joined #mlpack
thyrix has quit [Quit: Leaving]
thyrix has joined #mlpack
thyrix_ has joined #mlpack
thyrix_ has quit [Read error: Connection reset by peer]
thyrix has quit [Read error: Connection reset by peer]
thyrix has joined #mlpack
thyrix has quit [Client Quit]
thyrix has joined #mlpack
thyrix has quit [Remote host closed the connection]
s1998 has joined #mlpack
mentekid_ has joined #mlpack
s1998 has quit [Ping timeout: 260 seconds]
mikeling has quit [Quit: Connection closed for inactivity]
yashu-seth has joined #mlpack
< yashu-seth>
hello everyone
< yashu-seth>
can someone please help me with a problem I am facing using mlpack
< yashu-seth>
I followed the building mlpack from source on ubuntu guide
< yashu-seth>
and everything installed correctly
< yashu-seth>
but when I run a script that has #include <mlpack/core/dists/gamma_distribution.hpp> using g++ my_file.cpp -lmlpack -std=gnu++11
< yashu-seth>
it says gamma_distribution.cpp:14:62: fatal error: mlpack/core/boost_backport/boost_backport_math.hpp: No such file or directory #include <mlpack/core/boost_backport/boost_backport_math.hpp>
< UtkarshGpta>
Hey yashu-seth!
< yashu-seth>
hello UtkarshGpta
< UtkarshGpta>
You need to save your .cpp file inside the src folder that contains the folder mlpack.
< UtkarshGpta>
I am assuming that you built the package using "make" command only.
< UtkarshGpta>
Look at the file address "mlpack/core/dists/gamma_distribution.hpp"
< UtkarshGpta>
Hope that solves the problem.
< yashu-seth>
yes I used make
< yashu-seth>
that fixes the problem
< yashu-seth>
thanks
< UtkarshGpta>
Cool! (y)
< yashu-seth>
can you please tell me one more thing
< yashu-seth>
Why do I have to keep this in the src folder?
< UtkarshGpta>
Since from the program preprocessor directive you can see that the file to be included is "mlpack/core/dists/gamma_distribution.hpp"
< yashu-seth>
Does this mean I have to keep my .cpp file in the git cloned folder if I want to see the latest changes that I have made during a PR change?
< UtkarshGpta>
This file can be accessed by the same address if you save in the src folder. Or the other way round is use the gamma_distribution.hpp file in the same directory as your cpp code but keep in mind that you change the preprocessors accordingly.
< UtkarshGpta>
Sadly, I can't say anything about that.. I am myself new to mlpack and figuring out the ways to contribute xD
< yashu-seth>
Isn't there a way to specify the absolute path to look for "mlpack/core... " So that whenever I run a script from anywhere it looks for the desired mlpack folder?
< yashu-seth>
Okay. Thanks a lot for your help.
< UtkarshGpta>
I would love to know the answer to that. Wait for the moderators to reply :)
< zoq>
You can specify the include and library path: g++ file.cpp -std=c++11 -I/home/marcus/src/mlpack/build/include/ -L/home/marcus/src/mlpack/build/ -lmlpack -larmadillo
< yashu-seth>
Thanks zoq. But how to run my file so that I can see the latest changes of my PR?
< zoq>
One way would be to link against your mlpack version, so rebuild mlpack ('make') and link against the modified version by specifying -I... and -L.... Another way would be to test your code by writing a simple unit test and use the mlpack_test executable to run your test.
yashu-seth has quit [Ping timeout: 260 seconds]
yashu-seth has joined #mlpack
< yashu-seth>
Thanks a lot zoq. This should fix my problem.