undefined reference to `lzma_code'

13,244

Solution 1

On a debian / ubuntu system, apt-get install liblzma-dev will do the trick. Link with -llzma.

Solution 2

You're probably missing the liblzma.a, which should have come as a dependency from libxml2, if you had got it from a package.

Share:
13,244
Juneyee
Author by

Juneyee

Updated on June 04, 2022

Comments

  • Juneyee
    Juneyee almost 2 years

    I try to pack my application and static link all libraries. But I get this error.The Makefile is shown below:

    CC          = gcc
    INCPATH     = -I/home/johnny/Application/FileBasedReG/include/RealityGrid
    LIBS        = -L/home/johnny/Application/FileBasedReG/lib/RealityGrid -lReG_Steer -l:libxml2.a -l:libncurses.a -l:libm.a -l:libz.a -l:libtermcap.a
    
    OBJECTS     = mini_steerer.o
    
    TARGET      = mini_steerer
    
    ###### Compile ######
    all: $(TARGET)
    
    $(TARGET): $(OBJECTS)
        $(CC) $(INCPATH) -o $(TARGET) $(OBJECTS) $(LIBS)
    
    mini_steerer.o: ./mini_steerer.c ./mini_steerer.h
        $(CC) -c $(INCPATH) -o mini_steerer.o ./mini_steerer.c
    

    I think I need to add one or two more static libraries, but I can't find what they are.