Re: [Hamlib-developer] How to link in binary
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Stephane F. <f4...@fr...> - 2001-11-26 17:39:09
|
En réponse à John Roberts <js...@ho...>:
> How do I link my binary with hamlib? Do I have to use libtool and do all the
> DLL stuff? Or can I just link the .a for my radio into the binary? [I can't
> get the latter to work -- it complains about calls to dl_open...]
hmm, some output traces would help in that case. I'm suspecting Hamlib
is unable to load the backend (i.e. the .so or .la module).
Linking against Hamlib is be pretty straight forward. No need to worry
about libtool, it is there to be transparent.
gcc myapp.o -lhamlib -o myapp
Add -L/usr/local/lib if needed. Statically linking with .a if okay too.
If linking is fine, "ldd myapp" should report no unmet dependencies.
When does the problem appear? at link time or at run time?
Are you using the RPM release? Does rigctl works for you?
My guess is your application is not able to find the backend module.
This should not happen with the RPMs (unless there's a bug waiting for a fix :)
In the other cases, you may have to play with LD_LIBRARY_PATH.
> BTW, I still can't read sig strength or freq from my Icom 756Pro. Is that
> right? I'm using 1.1.2.
Same question, are you using rigctl to query freq and sig strength?
What are the error message (add -vvvv for verbose mode) ?
73, Stephane
|