CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2012

    Unhappy include path problems


    [edit: This is a general problem i have with a lot of libraries, i'm using LLVM as an illustrative example.]

    I want to use the LLVM framework libraries.
    So i downloaded LLVM, compiled it, added the include\ and \build\lib\ directories to my default paths and gave it a go.

    however, i keep getting problems like this:

    error C1083: Cannot open include file: 'llvm/Support/DataTypes.h': No such file or directory c:\users\tuli\desktop\lllvm\llvm\include\llvm-c\core.h 18

    this is the code in question (core.h)

    #include "llvm/Support/DataTypes.h"

    Ofcourse: if you use "x.h" instead of <x.h>, it wont find the llvm/ dir, which i added previously to the include paths!

    my code:

    #include <llvm-c/Analysis.h>
    #include <llvm-c/Disassembler.h>
    int main()
    	return 0;

    I have had this issue before with other libraries. Previously, i'd just change all the #include "..." to #include <...>.
    There are way too many header files involved here, though.

    What to do?

    VS2010 sp1
    Win 7 sp 1 x64
    latest llvm
    Last edited by tuli; August 3rd, 2013 at 11:27 AM.

  2. #2
    Join Date
    Jan 2006

    Re: include path problems

    If the header is not found when you use this:
    #include "xyz"
    The preprocessor should re-try as if it were:
    #include <xyz>
    Hence, a manual change should be unnecessary.

    I wonder if this is just a case of you adding wrong paths to the list of paths to be searched for headers.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  3. #3
    Join Date
    Jun 2012

    Re: include path problems

    Resolved! Thanks!

    The fault lies with some sort of cmake hiccup. DataTypes.h was located in the wrong directory, and i found a DataTypes.h.cmake in its place. Rearranging the files appropriately solved the problem.
    (Previously, i just checked for the existence of "DataTypes.*"...)

    It's still a little wired that i was able to resolve very similar errors by ""/<> substitution. Maybe i'll get back to that after the holydays.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.