Easy problem? : "could not open stdio.h" ??!

Discussion in 'Embedded Systems and Microcontrollers' started by hazzman, Jan 26, 2008.

  1. hazzman

    Thread Starter Member

    Dec 17, 2007
    13
    0
    Quite embarrassed for asking this, but i literally don't understand why i'm having this VERY trivial problem for programming my 8051 based MCU (CC2430) on IAR:

    I want to use the stdio.h to access I/O functions, obviosuly- namely sprintf. But when i include it using:
    #include <stdio.h>

    or even:
    #include "stdio.h" (incorrect inclusion i know)

    The IAR compiler complains: could not open source file "stdio.h".
    Now i've tried to see all the possible problems by making sure i'm using the CLIB library (lagacy C) and have all the other setting done.

    I know for SURE that i'm allowed to use stdio.h and it is compatible with MCU programming, but what setting do i need to change/include/configure to use stdio.h.

    Please tell me this is a little silly problem that can be sorted out!!
     
  2. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    My first suspicion would be that the file stdio.h is not located in the default directory being used by the compiler to hold the header-files.

    Have you check this possibility out?

    hgmjr
     
  3. hazzman

    Thread Starter Member

    Dec 17, 2007
    13
    0
    problem sorted, for IAR 5.x and beyond you have to specify the pathname of the header filer:

    #include <pathname\header_file.h>

    A bit silly and crap really. IAR compiler real dumb.
     
Loading...