These are chat archives for symengine/symengine

28th
Dec 2014
Shivam Vats
@shivamvats
Dec 28 2014 09:01
@sushant-hiray Could you please look into the errors?
Ondřej Čertík
@certik
Dec 28 2014 10:27
hi @shivamvats
csympy is meant to be a C++ library usable from many languages, i.e. C++, Python, later Julia (after we write the wrappers), ...
Currently the best experience is with the Python wrappers, which work seamlessly with sympy.
As to your errors, can you post a full log, starting with cmake and then make? You can use gist.github.com to post it.
We should be able to figure out what's wrong from the full log.
Ondřej Čertík
@certik
Dec 28 2014 10:32
Finally, don't use "sudo make install", just use "make install" and tell cmake which directory to install into using -DCMAKE_INSTALL_PREFIX:PATH="/some/path"
Shivam Vats
@shivamvats
Dec 28 2014 10:41
Thanks a lot @certik for your reply!
Actually, there is no problem with cmake and make. And I am even able to use the python wrappers. I'm running into problems only when I try to include csympy in a cpp code.
I'll post updates after trying with your suggestions
I've another question: Say I write a new function in the library. Do I need to 'make' the library again to be able to use the python wrapper?
Ondřej Čertík
@certik
Dec 28 2014 10:55
Yes, if you add a new function or modify any C++ or Cython sources, you need to do make to rebuild the library. If you modify the Python sources, then you don't if you use the library without installing, otherwise you need to do make install again.
If you use csympy from your own C++ core, then you need to make sure you link with it properly. We regularly test this on Travis, so just use this test as an example: https://github.com/sympy/csympy/blob/9e6384713b2254413d15980c366521ac39624e1d/bin/test_travis.sh#L98
Do you use cmake for your own project? If so, I think there is a way somehow for csympy to export some cmake files so that you can just easily include them in your project, so that it links with all the necessary libraries automatically.
We should probably add a cmake example how to use csympy from other C++ projects as well.
Shivam Vats
@shivamvats
Dec 28 2014 10:59
I was having trouble writing a makefile. That is why I first tried linking on netbeans and then by sudo make install
I think a cmake example would be great!
Shivam Vats
@shivamvats
Dec 28 2014 11:12
Thanks a lot for all the help :)