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

"CImg.h" file not found #44

Open
tell10glu opened this issue Mar 16, 2016 · 5 comments
Open

"CImg.h" file not found #44

tell10glu opened this issue Mar 16, 2016 · 5 comments
Labels

Comments

@tell10glu
Copy link

I follow the instruction here. http://cmp.felk.cvut.cz/~uricamic/clandmark/index.php?page=installation#install_linux . I added the header file to my project and build fails because of CImg.h not found. I don't know what i did wrong. Help me please

@uricamic
Copy link
Owner

Hi @tell10glu,

could you please provide some screenshot of the error you are getting. On linux there were no issues of this kind reported, so it might help to get in the picture of what might be wrong in your case.

@tell10glu
Copy link
Author

In CApperanceModel.h this is the error i am getting.
http://s21.postimg.org/ajv659nfr/Screen_Shot_2016_03_16_at_22_03_54.png

@uricamic
Copy link
Owner

Sorry, I didn't specify it, but I meant the screenshots of the whole CMake configuration procedure. And also bigger pictures please, this is not very readable.

@tell10glu
Copy link
Author

Is this enough ? If it's not, you should tell me where is the path of configuration file that you want.
http://s8.postimg.org/5g0qouk8l/Screen_Shot_2016_03_16_at_22_16_49.png

@uricamic
Copy link
Owner

I see, now I finally got what is the problem.

You compiled the library successfully and now you would like to use it in your project, right?

This is not documented on the webpages yet, I am sorry. Hope this quick tutorial will help you.

You should either follow the scheme which is used in examples folder, or use the external approach, the template for the CMakeLists.txt would be as follows

cmake_minimum_required(VERSION 2.8.9)

project(clandmark_external)

find_package(clandmark REQUIRED)
find_package(flandmark REQUIRED)

include_directories(
  ${OpenCV_INCLUDE_DIR}
  ${CLANDMARK_INCLUDE_DIRS}
  ${FLANDMARK_INCLUDE_DIRS}
)

if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE RELEASE CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
      FORCE
  )
endif(NOT CMAKE_BUILD_TYPE)

SET (CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,'$ORIGIN/' " )

set(SRCS main)
foreach(var ${SRCS})
  add_executable(${var} ${var}.cpp)
  target_link_libraries(${var} ${FLANDMARK_LIBRARIES} ${CLANDMARK_LIBRARIES}
endforeach()

option(DOUBLE_PRECISION "Set the default precision used in CLandmark" ON)
# propagate precision definition
if(DOUBLE_PRECISION)
  add_definitions( -DDOUBLE_PRECISION=1 )
else(DOUBLE_PRECISION)
  add_definitions( -DDOUBLE_PRECISION=0 )
endif(DOUBLE_PRECISION)

modify it as needed (i.e. add some possible additional libraries like OpenCV etc.).

In case clandmark library is not found automatically, just modify the path manually during CMake configuration process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants