bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using dirname module in C++


From: Paul Eggert
Subject: Re: using dirname module in C++
Date: Sat, 14 Aug 2010 09:26:48 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

On 08/13/10 16:37, Peter Johansson wrote:
> /usr/bin/ld: Undefined symbols:
> _program_name

dirname depends on xalloc to allocate storage,
and that depends on xalloc-die, which needs
to know your program's name.  One simple
way to fix the problem is to define a global
variable program_name and arrange for your
main function to set it from argv[0].  Or,
you can supply your own xalloc_die function.
Or, if you want to check the result against
NULL yourself, you can use mdir_name rather
than dirname.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]