Thread: error in -stdio.h __VALIST

  1. #1
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972

    error in -stdio.h __VALIST

    I just bought the book "Tricks of the Windows Game Programming Gurus" and I tried to test out the first code example, and unfortunately the author uses C...All of the headers are the .h ones and it seems to work fine except I'm getting errors from stdio.h:

    In file included from C:/DEV-CPP/include/c++/cstdio:52,
    from C:/DEV-CPP/include/c++/mingw32/bits/c++io.h:35,

    from C:/DEV-CPP/include/c++/bits/fpos.h:44,
    from C:/DEV-CPP/include/c++/iosfwd:46,
    from C:/DEV-CPP/include/c++/ios:44,
    from C:/DEV-CPP/include/c++/ostream:45,
    from C:/DEV-CPP/include/c++/iostream:45,
    from C:/DEV-CPP/include/c++/backward/iostream.h:32,
    from E:/T3DGameR1/Source/T3DCHAP01/blackbox.cpp:12:
    C:/DEV-CPP/include/stdio.h:216: type specifier omitted for parameter `
    __gnuc_va_list'
    C:/DEV-CPP/include/stdio.h:217: type specifier omitted for parameter `
    __gnuc_va_list'
    And they point to function declarations like:
    Code:
    int	vfprintf (FILE*, const char*, __VALIST);
    int	vprintf (const char*, __VALIST);
    int	vsprintf (char*, const char*, __VALIST);
    int	_vsnprintf (char*, size_t, const char*, __VALIST);
    I've never had these errors before and can't seem to get rid of them...

    EDIT:

    Well I got it to compile, but only by eliminating all included headers that included stdio.h, which was about half...this is insane how many headers he included that he didn't need...the only thing I sacrificed by removing them was sprintf() lol...

    EDIT2:

    I could still use an explanation on why I'm suddenly getting these errors...I really would like to use some other headers, but it wont let me
    Oh I'm using Dev-C++ 4.9.8.1
    Last edited by JaWiB; 09-18-2003 at 09:26 PM.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  2. #2
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455
    how old is the book?

    maybe he's using borland. i know trying out some examples in vc that were meant to be in borland never worked out..same problem with header files.

  3. #3
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Its pretty new, and I know he's using VC++ 6
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  4. #4
    Disturbed Boy gustavosserra's Avatar
    Join Date
    Apr 2003
    Posts
    244
    I was walking through the stdio.h code and saw:
    #ifdef __GNUC__
    #define __VALIST __gnuc_va_list
    #else
    #define __VALIST char*
    #endif

    The __gnuc_va_list must be in other header, but try to
    #undef __GNUC

    Ble! I donīt know!
    Nothing more to tell about me...
    Happy day =)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. stdio.h cstdio.h
    By salvadoravi in forum C Programming
    Replies: 3
    Last Post: 01-21-2008, 03:00 PM
  2. error: stdio.h: No such file or directory
    By MindLess in forum C Programming
    Replies: 9
    Last Post: 12-20-2007, 08:11 AM
  3. stdio.h
    By Vertex34 in forum C Programming
    Replies: 2
    Last Post: 07-12-2004, 10:18 AM
  4. stdio.h - where is actual code
    By voltson4 in forum C Programming
    Replies: 0
    Last Post: 02-26-2003, 05:11 PM
  5. Modifying stdio.h
    By Spectrum48k in forum C Programming
    Replies: 10
    Last Post: 05-29-2002, 08:30 AM