Results 1 to 2 of 2

Thread: header file in kernel file

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    10

    header file in kernel file

    i just wanted to know can we include header file in the file that contains a kernel
    thanks in advance

    regards
    megharaj

  2. #2
    Senior Member
    Join Date
    Mar 2011
    Location
    Seoul
    Posts
    118

    Re: header file in kernel file

    Yes, you can include header files in the file that contains a kernel. Please be aware that not all header files are supported, e.g., complex.h, string.h, etc. A more detailed list can be found in the specification document.

    I found that using #include "myheader.h" alone doesn't pull in the header file even if it's located in the same directory as the executable and kernel file. To get it pulled in I had to pass "-I./" as a program build option.

    Does anyone happen to know if the search rules for headers are different inside a kernel file, e.g., #include <myheader.h> and #include "myheader.h"? I was a bit surprised I had to explicitly pass the above program build option.

Similar Threads

  1. header file inconsistency
    By noah_r in forum Interoperability issues
    Replies: 0
    Last Post: 04-02-2012, 01:10 PM
  2. EGL 1.2 Header file
    By Nils Pipenbrinck in forum Cross API and window system integration
    Replies: 3
    Last Post: 10-04-2006, 02:00 PM
  3. EGL 1.2 .h header file
    By PeterM in forum Cross API and window system integration
    Replies: 2
    Last Post: 04-09-2006, 07:19 PM

Posting Permissions

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