Thread: Problem finding nested header files

  1. #1
    Registered User
    Join Date
    Aug 2013
    Posts
    4

    Problem finding nested header files

    Hello all,

    I'm working with CGAL - Computational Geometry Algorithms Library, which is a library of geometry functions declared as several thousand header-only files. When I run a basic program (source code https://github.com/acgetchell/Cplusp...x_triangle.cpp ) I get this output:

    https://gist.github.com/acgetchell/6360577

    I have tried switching angle brackets to quotes. I have also started reading up on CMake.

    Do I need to walk the dependency tree and add all of those files to my CMakeLists.txt? Or is there a way to tell the compiler to look in subdirectories?

    Thanks,

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Not files - you need to add the include directories to include search list

    When you get error that include file from some subdirectory not found - you add this directory to list of dirs where the comiler searches for includes.
    And try again. Till all include files are found...

    Then you do the same for linker with Library directories search path
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Registered User
    Join Date
    Aug 2013
    Posts
    4
    Got it, thanks!

    Looks like I've got this sorted out using Cmake, and specifically, the cgal_create_cmake_script which handily generates CMakeLists.txt that builds using the installed version of CGAL. So I don't need to recopy CGAL or boost into my project source directory.

    One step on a very long path to learning.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem creating header files
    By django in forum C Programming
    Replies: 11
    Last Post: 08-10-2011, 03:52 PM
  2. Using header files problem!
    By Always in forum C++ Programming
    Replies: 7
    Last Post: 08-05-2011, 03:04 PM
  3. Gcc compiler not finding header files
    By shiroaisu in forum C Programming
    Replies: 7
    Last Post: 07-08-2011, 01:03 PM
  4. problem with header files
    By Farnaz in forum C++ Programming
    Replies: 2
    Last Post: 04-01-2011, 12:11 PM
  5. Problem with Header files.
    By chakra in forum C Programming
    Replies: 5
    Last Post: 05-10-2008, 01:30 PM