Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build in CLion #68

Closed
SSejnt opened this issue Apr 24, 2017 · 1 comment
Closed

Can not build in CLion #68

SSejnt opened this issue Apr 24, 2017 · 1 comment

Comments

@SSejnt
Copy link

SSejnt commented Apr 24, 2017

Hi,
I want to analyze your algorithm for my diploma thesis. But I have problem with build it in Clion 2016.3.4. I have linux mint cinnamon 64-bit. I have the latest versions of liblizma-dev(5.1.1alpha+20120614-2ubuntu2) and libarchive-dev(3.2.1-2~ubuntu16.04.1). And i get lot of errors in function definitions for example in file write.c:

can not resolve "lzma_index_end"
can not resolve "lzma_check_size"
can not resolve "lzma_block_encoder"
lzma_index_encoder , lzma_block_unpadded_size, lzma_end etc

my Cmakelists file

`cmake_minimum_required(VERSION 3.6)
project(pixz_master)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c++11 -llzma ")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}- fopenmp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE")

set(SOURCE_FILES
src/common.c
src/cpu.c
src/endian.c
src/list.c
src/pixz.c
src/pixz.h
src/read.c
src/write.c)

add_executable(pixz_master ${SOURCE_FILES})
`
I tried link lzma or including lzma.h library but without success.
Thank you for reply.

@SSejnt
Copy link
Author

SSejnt commented Jul 20, 2017

here is correct Cmakelists:

cmake_minimum_required(VERSION 3.6)
project(pixz_master)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c++11 -llzma -pthread -lm")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}- fopenmp -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE")

set(SOURCE_FILES
src/common.c
src/cpu.c
src/endian.c
src/list.c
src/pixz.c
src/pixz.h
src/read.c
src/write.c)

add_executable(pixz_master ${SOURCE_FILES})

FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h)
FIND_LIBRARY(LIBLZMA_LIBRARY lzma)

TARGET_LINK_LIBRARIES (pixz_master lzma)
TARGET_LINK_LIBRARIES (pixz_master pthread)
TARGET_LINK_LIBRARIES(pixz_master archive)
TARGET_LINK_LIBRARIES(pixz_master m)

@SSejnt SSejnt closed this as completed Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant