Errors thrown from lzma.h file during compilation

2014-02-10
2014-02-11
  • Giora Vered

    Giora Vered - 2014-02-10

    Hi,
    I'm trying to use xz-utils lib.
    for that I have downloaded the zipped folder, and did:
    1. ./autogen.sh
    2. ./configure --prefix='/usr/'
    3. make
    4. make install

    it installed the files to /usr/includes/lzma - which is fine.

    In my Makefile.am I type:
    INCLUDES = -I /usr/include/lzma (and all other relevant paths for me)

    and in the LIB section I type: -liblzma (and all other relevant libs)

    In my source code I've added: #include <lzma.h>

    ./autogen && ./configure && make

    resulted with this output:

    /usr/include/lzma/lzma.h:16:3: error: #error Never include this file directly. Use <lzma.h> instead.
    In file included from xUnit/crspace_agent_test.cpp:16:
    /usr/include/lzma/lzma.h:128: error: ISO C++ forbids declaration of ?LZMA_API? with no type
    /usr/include/lzma/lzma.h:128: warning: ?LZMA_API? initialized and declared ?extern?
    /usr/include/lzma/lzma.h:128: error: ?lzma_bool? was not declared in this scope
    /usr/include/lzma/lzma.h:128: error: expected ?,? or ?;? before ?lzma_mf_is_supported?
    /usr/include/lzma/lzma.h:170: error: ISO C++ forbids declaration of ?LZMA_API? with no type
    /usr/include/lzma/lzma.h:170: warning: ?LZMA_API? initialized and declared ?extern?
    /usr/include/lzma/lzma.h:170: error: redefinition of ?int LZMA_API?
    /usr/include/lzma/lzma.h:128: error: ?int LZMA_API? previously defined here
    /usr/include/lzma/lzma.h:170: error: ?lzma_bool? was not declared in this scope
    /usr/include/lzma/lzma.h:217: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:240: error: ISO C++ forbids declaration of ?uint8_t? with no type
    /usr/include/lzma/lzma.h:240: error: expected ?;? before ?*? token
    /usr/include/lzma/lzma.h:254: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:281: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:293: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:316: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:342: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:375: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:384: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:385: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:386: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:387: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:388: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:389: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:390: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:391: error: ?uint32_t? does not name a type
    /usr/include/lzma/lzma.h:392: error: ?lzma_reserved_enum? does not name a type
    /usr/include/lzma/lzma.h:393: error: ?lzma_reserved_enum? does not name a type
    /usr/include/lzma/lzma.h:394: error: ?lzma_reserved_enum? does not name a type
    /usr/include/lzma/lzma.h:395: error: ?lzma_reserved_enum? does not name a type
    /usr/include/lzma/lzma.h:419: error: ISO C++ forbids declaration of ?LZMA_API? with no type
    /usr/include/lzma/lzma.h:419: warning: ?LZMA_API? initialized and declared ?extern?
    /usr/include/lzma/lzma.h:419: error: redefinition of ?int LZMA_API?
    /usr/include/lzma/lzma.h:128: error: ?int LZMA_API? previously defined here
    /usr/include/lzma/lzma.h:419: error: ?lzma_bool? was not declared in this scope

    I'm running on RedHat 6.2 64bit.
    Would appreciate any kind of help.

    Thanks,
    Giora

     
    Last edit: Giora Vered 2014-02-10
  • Giora Vered

    Giora Vered - 2014-02-11

    Please ignore.
    Issue solved after installing new copy.

    Thanks.

     

Log in to post a comment.