[Nut-upsdev] Makefiles driving me NUTs
Peter Selinger
selinger at mathstat.dal.ca
Fri Jan 12 22:00:02 CET 2007
What you are compiling is the libupsclient.a library, which is
intended to be a stand-alone library used by other programs (including
some standard NUT clients).
IMHO, it would be wrong to use NUT-specific error reporting functions
in a library. Instead, the library should communicate errors through
its API, preferably by returning documented exit codes from its
functions, perhaps setting errno, etc. It should be up to the client
programs to decide how to report these errors.
At least I assume that his the reason that libcommon.a is not linked
into libupsclient.a; when I wrote the Makefile.am, I simply copied the
behavior that existed in the pre-automake Makefile.in.
-- Peter
Arjen de Korte wrote:
>
> I want to use upsdebugx, upslogx in 'clients/upsclient.c', however this
> fails with the following error messages (I trimmed the path to the build
> directory to <path> in order to prevent line wrapping):
>
> <path>/clients/upsclient.c:941: undefined reference to `upsdebugx'
> <path>/clients/upsclient.c:910: undefined reference to `upslogx'
> <path>/clients/upsclient.c:927: undefined reference to `upslogx'
> <path>/clients/upsclient.c:917: undefined reference to `upslogx'
>
> Apparently, the library ../common/libcommon.a is not linked in. Why not?
> Can this be fixed somehow? And where?
>
> Best regards, Arjen
>
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
>
More information about the Nut-upsdev
mailing list