Thread: Why does Dev-C++ not look for my include

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    155

    Why does Dev-C++ not look for my include

    HI I am using Dev-C++ and I was trying to work on something new. I am trying to use SDK 5.1 for TTS but when I "#include <sapi.h>" it says its not there. Will I look for the file include and found it in SDK... but I dont get why the compiler says its not there? Is there something I miss on when I was trying to use it?

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    Try replacing the < and > with "s and specify the full path to your include, i.e:-
    Code:
    #include "C:\stuff\SDK\sapi.h"
    And we'll go from there.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Or you can move the relavent header files to your compiler's include directory. Or best of all, add the SDK's include directory to your compiler's includes search path. For GCC:
    Code:
    gcc -Ic:\somewhere\include\ hippo.c -o hippo.exe
    In Dev-C++ it's in the compiler options somewhere ("Extra include directories").
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    29
    You also have to have all of your files in a project if is a header file you made
    Last edited by rainmanddw; 02-19-2006 at 01:21 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. debug assertion failed!
    By chintugavali in forum C Programming
    Replies: 4
    Last Post: 12-11-2007, 06:23 AM
  2. 2d game
    By JordanCason in forum Game Programming
    Replies: 5
    Last Post: 12-08-2007, 10:08 PM
  3. C++ code in 1999
    By chen1279 in forum C++ Programming
    Replies: 6
    Last Post: 10-04-2006, 10:02 AM
  4. dont konw what to do next.
    By negevy in forum C Programming
    Replies: 29
    Last Post: 09-09-2005, 03:06 PM
  5. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM