Hello Christian,
You don;t need to add gSystem->Load("libMathMore") inside your code.
`root-config --libs` -lMathMore
Cheers
Lorenzo
On Mar 10, 2010, at 10:24 PM, Christian Hansen wrote:
>
>
> Dear Lorenzo,
>
> I tried
>
>
> # include "TSystem.h"
> # include "Math/SpecFunc.h"
> using namespace std;
> int main() {
> gSystem->Load("libMathMore");
> double K = ROOT::Math::comp_ellint_1(0.7);
> cout<<"K = "<<K<<endl;
> }
> #endif
>
>
> but when I compile the attached program I still get
>
>
> Undefined symbols:
> "ROOT::Math::comp_ellint_1(double)", referenced from:
> _main in test.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [test] Error 1
>
>
>
> What did I do wrong?
>
> Best regards
> /Christian
>
>
> <test.tgz>
>
>
>
>
>
>
> On Mar 10, 2010, at 6:56 PM, Lorenzo Moneta wrote:
>
>> Hi Christian, >> >> you need to add libMathMore to the list of linked libraries. >> >> Cheers >> >> Lorenzo >> On Mar 10, 2010, at 5:05 PM, Christian Hansen wrote: >> >>> Dear Rooters, >>> >>> What do I do wrong then I try to use the special function comp_ellint_1 ? >>> >>> >>> # include "Math/SpecFunc.h" >>> using namespace std; >>> int main() { >>> double K = ROOT::Math::comp_ellint_1(0.7); >>> cout<<"K = "<<K<<endl; >>> } >>> >>> >>> When I compile this it says >>> >>> Undefined symbols: >>> "ROOT::Math::comp_ellint_1(double)", referenced from: >>> _main in test.o >>> ld: symbol(s) not found >>> collect2: ld returned 1 exit status >>> make: *** [test] Error 1 >>> >>> >>> Please see the attached test program that I try to compile. >>> >>> Best regards >>> /Christian >>> >>> <test.tgz> >>
>> Hi Christian, >> >> you need to add libMathMore to the list of linked libraries. >> >> Cheers >> >> Lorenzo >> On Mar 10, 2010, at 5:05 PM, Christian Hansen wrote: >> >>> Dear Rooters, >>> >>> What do I do wrong then I try to use the special function comp_ellint_1 ? >>> >>> >>> # include "Math/SpecFunc.h" >>> using namespace std; >>> int main() { >>> double K = ROOT::Math::comp_ellint_1(0.7); >>> cout<<"K = "<<K<<endl; >>> } >>> >>> >>> When I compile this it says >>> >>> Undefined symbols: >>> "ROOT::Math::comp_ellint_1(double)", referenced from: >>> _main in test.o >>> ld: symbol(s) not found >>> collect2: ld returned 1 exit status >>> make: *** [test] Error 1 >>> >>> >>> Please see the attached test program that I try to compile. >>> >>> Best regards >>> /Christian >>> >>> <test.tgz> >>
This archive was generated by hypermail 2.2.0 : Thu Mar 11 2010 - 11:50:01 CET