> Try putting the library at the end. Some linkers display rather...
classic behavior when linking statically (i.e. only linking in the files
that are needed, but if you name a library as first thing, then no file
is needed at that point).

Works!

On Mon, May 21, 2018 at 9:30 PM, Markus Wichmann <nullp...@gmx.net> wrote:
> On Mon, May 21, 2018 at 07:12:46PM +0300, Adrian Grigore wrote:
>> cc -lutf -o cat cat.o util.o
>> cat.o: In function `main':
>> cat.c:(.text+0x179): undefined reference to `chartorune'
>> cat.c:(.text+0x1dd): undefined reference to `runetochar'
>> cc: error: linker command failed with exit code 1 (use -v to see invocation)
>> gmake: *** [Makefile:15: cat] Error 1
>
> Try putting the library at the end. Some linkers display rather...
> classic behavior when linking statically (i.e. only linking in the files
> that are needed, but if you name a library as first thing, then no file
> is needed at that point).
>
> Ciao,
> Markus
>



-- 
Thanks,
Adi

Reply via email to