Including libnova


I just downloaded and compiled the libnova package (astronomical functions) on my Mac (10.5.8). Everything works fine.

Now I would like to include these headers/functions in my root macros. But I obtain the following errors:

[code] Expected in: dynamic lookup

Load Error: Failed to load Dynamic link library[/code]


Undefined symbols:
  "_main", referenced from:
      start in crt1.10.5.o
  "_ln_get_airmass", referenced from:
      libnova_test()     in libnova_test_C_ACLiC_dict.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
*** Interpreter error recovered ***

Can anyone give me a hint what should be changed?



do you load the library (gSystem->Load(“libnova”) or whatever it’s called) before using it in your macros?

Cheers, Axel.

Well, I have to say I don’t know which file I should load.

When I compiled libnova, I was looking for a .so which I could use, but the only thing I see is .a, .la and .dylib. I tested gSystem->Load with all 3 files, but none worked.


you can build a .so from a .a. But this has nothing to do with ROOT; I’d appreciate if you could ask the nova people for help…

Cheers, Axel.

So I made a .so file and tried to load it with


But it didn’t change the output I still get the error!


is the function ln_get_airmass defined or only declared? Is it defined in a different library? If so: load it first.

If this doesn’t help: please post exactly what you type and what ROOT answers, right from where you started ROOT. Copy & paste into a text file and attach it, please.

Cheers, Axel.

Thanks for your patience!

You were right! I had to load the library file! But there was some code in the header files root didn’t understand. After modifying these, everything works fine now.