![]() |
syntax error in code that i have never even seen before: HELP!
so... i was working with my code... and i try to compile it again... the same way i have for about 50 times now, when suddenly a syntax error apperes. no problem right? it is probley a missing semicolon or something, except it appered in some wacked section of the code i didnt even know EXisted! Me = CONFUSED!
:ahh: :confused: :eek: :mad: tryied fixing it, but came up with nothing... tryied cutting and pasting from defalt code, still nothing.... HELP! here is the magical code of doom(all of it, the entire page) ( i founded it in C:mcc18\h\stdarg.h): Quote:
the dead line is in 2 days!! ack!!!!!! and my code is having problems after it was working fine! (but wasnot done) |
Re: syntax error in code that i have never even seen before: HELP!
Our programmer had the same problem happen yesterday. It has nothing to do with the stdarg.h file. Never touch the include files in MCC18/h/. Always assume they work.
In our case the programmer was new to declaring variables in .h files and had a syntax problem. I showed him files which had the proper syntax, he made changes to his code then it worked fine. If you have a known timeframe of when the last build worked look for all source files with a later date. |
Re: syntax error in code that i have never even seen before: HELP!
Well, don't always assume that the header files are correct... I was having huge headaches trying to compile a line of code to set the priority of interrupt 3 (INT3IP) to 0. Turned out that the header file had misspelled it as INT3P, even though the datasheet was quite clear that it was INT3IP... That blew a couple of my hours! :/
|
Re: syntax error in code that i have never even seen before: HELP!
so.... are you saying that there is a problem somewhere else in my code(very likely) and the compiler desided to put the error message here?
|
Re: syntax error in code that i have never even seen before: HELP!
Quote:
What probably happened is you introduced a syntax error, but you know how the compiler will sometimes highlight the line after an error? When it finally figures out you mistyped something? If your syntax error occurs right before an #include statement, it'll instead highlight the first line in that inoffensive include file (or one of the many nested system include files). I've often seen it when someone accidentally hits the keyboard and unknowingly inserts a random character at the very top of one of their source files. |
Re: syntax error in code that i have never even seen before: HELP!
ROFL! the problem was a random "C" in front of a /*
me = feel stupid......... thx!!! |
Re: syntax error in code that i have never even seen before: HELP!
Quote:
|
Re: syntax error in code that i have never even seen before: HELP!
:cool: Great Job!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :cool:
|
Re: syntax error in code that i have never even seen before: HELP!
I'm having the same problem, however there is no random letters before comments and after the syntax error I commented out the last bit of code (just a Get_Analog_Value). It seems weird a typedef* va_list function would be the syntax though.
|
Re: syntax error in code that i have never even seen before: HELP!
Well, based on what you posted you have a typo in one of your .c files right before an #include "stdio.h"
What file is being compiled when the syntax error is reported? Post that file. |
Re: syntax error in code that i have never even seen before: HELP!
Always remember that you are smarter than the compiler.
How is something like this tracked down? A problem with a standard h file is most likely caused by a syntax error before that file is included. Look at what files in the FRC directory include stdarg.h. None. So it has to be included from a .h file somewhere. Look in MCC18/h. It is only included by stdio.h and is the first thing in that file. So the place to look for errors is between the start of the .c file which is not compiling and the line "#include <stdio.h>". |
| All times are GMT -5. The time now is 09:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi