Go to Post We might not be as good as 217, or the other traditional "powerhouse" teams... but we are better because of them. Jason - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2007, 20:24
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
stdarg.h Syntax error

Hello,

This is my first time posting here, and first year compteting! I'm excited to be here, and thought that was worth mentioning

My problem, as that out of the blue my compiler gives me the error
Code:
Stdarg.h:6: Syntax Error
The line is
Code:
typedef void* va_list;
I have no idea why this occured, as about a hour earlier it compiled fine, and the only change I had made to it was adding a printf() statement. I tried deleting that afterward in hope that was the problem (though it shouldn't be anyways), but no go. The error was still apparent.

Has anyone encountered this before, or have any solutions?

Thanks a bunch,
Jedd
  #2   Spotlight this post!  
Unread 23-01-2007, 20:33
Orborde Orborde is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Apr 2004
Rookie Year: 2003
Location: Indianapolis, IN
Posts: 44
Orborde has a spectacular aura aboutOrborde has a spectacular aura about
Send a message via AIM to Orborde
Re: stdarg.h Syntax error

I have a hunch that you messed something up near the beginning of the file, and the stdarg.h error is simply the compiler complaining as a result of something in your file. For example:

Code:
int foo = 6 // no semicolon!
#include <stdio.h>
will tend to give you an error in stdio.h, even though the problem is in the original file. Take a look at the top of your file for syntax errors.
  #3   Spotlight this post!  
Unread 24-01-2007, 15:50
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
Re: stdarg.h Syntax error

All right, thanks. I don't think that is the problem as I've only added one function and the printf() function to all the code, and the function I made worked properly the day before... I'll check again. Anyne by chance know what file stdarg.h is included in?
  #4   Spotlight this post!  
Unread 24-01-2007, 16:17
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,856
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: stdarg.h Syntax error

stdarg.h is included by stdio.h

It is simply the first true line of code the compiler encounters when #include <stdio.h> is used and it can recognize that an error has occurred. The error won't be in the system files, but in .c files you have touched.

Usually I've seen this when random characters are accidentally typed on the very first line of a .c file.
Take a look to see if anything has been typed BEFORE the
/******************
on the very top line of the .c files you've been modifying.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #5   Spotlight this post!  
Unread 24-01-2007, 16:27
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
Re: stdarg.h Syntax error

Quote:
Originally Posted by Mark McLeod View Post
stdarg.h is included by stdio.h

It is simply the first true line of code the compiler encounters when #include <stdio.h> is used and it can recognize that an error has occurred. The error won't be in the system files, but in .c files you have touched.

Usually I've seen this when random characters are accidentally typed on the very first line of a .c file.
Take a look to see if anything has been typed BEFORE the
/******************
on the very top line of the .c files you've been modifying.
That was it! Thanks... I didn't find in the files I had been in, so I went through the others, and behold, there was a random "v" as the first character of the file.

Thanks a bunch for your help!
Jedd
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C18 v2.4 -- Syntax error where there is no syntax error Joel J Programming 7 12-01-2007 17:27
Array Syntax Error Andrew Blair Programming 7 05-02-2006 14:11
Syntax Error! Denz Programming 15 04-02-2006 23:57
Simple Syntax Error miketwalker Programming 6 06-01-2004 00:17


All times are GMT -5. The time now is 23:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi