I tried to compile the following simple C program in DEV c++ 4.9.9.2:
include <stdio.h>
int main(void){
printf("Testing");
return 0;
}
I got 25 compilation errors and most of them are about type specifier omitted in stdio.h. I am using windows vista business edition and the example C++ program works. Could anyone help me with this problem?
Thanks in advance!
Regards,
JH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Since it is identical to that provided with Dev-C++, Installing a separate copy of MinGW is a lot of work for no real benefit. You may still end up where you are now, just with far less disk space, and a bit of wasted life.
Just post your log again. It will be far easier for us to help you with a standard installation than one you have customised in any case.
The lines the error messages refer to all use the same __VALIST macro. I am willing to bet that you still have the aforementioned options set. Did you check the log to make sure they were truly disabled? We can't tell because you chose not to post that - again!
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
>> I got 25 compilation errors and most of them
>> are about type specifier omitted in stdio.h.
Did you? That's nice for you.
Error messages (and in fact the whole build log) contain information that is useful in diagnosing build issues. Why not give us that benefit and post the Compile Log text!?
We can see that your code is valid and that you are using the most recent version. You posted all the stuff that is good and usual (and therefore contains no useful information), and merely 'described' the stuff that is unusual and might actually provides any clue to your problem!
Is your attempt to hide this information some sort of experiment in Object Oriented problem solving!? ;-)
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please take a moment and look at the thread titled "Please Read Before Posting a Question", in particular, the section on the "Basic 3" - the pieces of information that a smart questioner provides to get better answers, faster, without having to rely on our psychic friends network subscription. ;)
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "E:\My_Documents\Cprograms\printing.c" -o "E:\My_Documents\Cprograms\printing.exe" -ansi -traditional-cpp -I"C:\Dev-Cpp\bin" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\bin" -L"C:\Dev-Cpp\lib"
In file included from E:\My_Documents\Cprograms\printing.c:1:
C:\Dev-Cpp\include\stdio.h:210: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:211: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:212: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:213: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:218: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:218: parse error before )'
C:\Dev-Cpp\include\stdio.h: In functionint vsnprintf(...)':
C:\Dev-Cpp\include\stdio.h:219: s' undeclared (first use this function)
C:\Dev-Cpp\include\stdio.h:219: (Each undeclared identifier is reported only once
C:\Dev-Cpp\include\stdio.h:219: for each function it appears in.)
C:\Dev-Cpp\include\stdio.h:219:n' undeclared (first use this function)
C:\Dev-Cpp\include\stdio.h:219: format' undeclared (first use this function)
C:\Dev-Cpp\include\stdio.h:219:arg' undeclared (first use this function)
C:\Dev-Cpp\include\stdio.h: At top level:
C:\Dev-Cpp\include\stdio.h:220: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:222: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:224: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:432: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:433: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:434: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:435: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:467: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:467: parse error before `)'
C:\Dev-Cpp\include\stdio.h:469: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:471: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:473: type specifier omitted for parameter
Execution terminated
This is the program:
include <stdio.h>
int main(void){
printf("Testing");
return 0;
}
Something must have gone wrong with the installation process? Thanks a lot!
JH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Unless you have a really good reason to have -traditional-cpp set, don't! That is your problem. I would advise against -ansi as well to be honest. In fact, unless you have a specific need, and are very sure what they do, don't set any non-default options other than perhaps -Werror -Wall -Wformat.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Clifford, I tried your advise and set all compilation options to default, but the same problem exist, I am going to install a separate mingw compiler in a diffrernt folder and include the files in the directories of compiler option...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you are asked to do something, please do not respond with just "I tried what you ask, and the problem remains", post your Basic 3 again. Remote debugging is a hard process, you need to be VERY methodical.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I tried to compile the following simple C program in DEV c++ 4.9.9.2:
include <stdio.h>
int main(void){
printf("Testing");
}
I got 25 compilation errors and most of them are about type specifier omitted in stdio.h. I am using windows vista business edition and the example C++ program works. Could anyone help me with this problem?
Thanks in advance!
Regards,
JH
Since it is identical to that provided with Dev-C++, Installing a separate copy of MinGW is a lot of work for no real benefit. You may still end up where you are now, just with far less disk space, and a bit of wasted life.
Just post your log again. It will be far easier for us to help you with a standard installation than one you have customised in any case.
The lines the error messages refer to all use the same __VALIST macro. I am willing to bet that you still have the aforementioned options set. Did you check the log to make sure they were truly disabled? We can't tell because you chose not to post that - again!
Clifford
>> I got 25 compilation errors and most of them
>> are about type specifier omitted in stdio.h.
Did you? That's nice for you.
Error messages (and in fact the whole build log) contain information that is useful in diagnosing build issues. Why not give us that benefit and post the Compile Log text!?
We can see that your code is valid and that you are using the most recent version. You posted all the stuff that is good and usual (and therefore contains no useful information), and merely 'described' the stuff that is unusual and might actually provides any clue to your problem!
Is your attempt to hide this information some sort of experiment in Object Oriented problem solving!? ;-)
Clifford
Please take a moment and look at the thread titled "Please Read Before Posting a Question", in particular, the section on the "Basic 3" - the pieces of information that a smart questioner provides to get better answers, faster, without having to rely on our psychic friends network subscription. ;)
Wayne
This is the output compile log:
Compiler: Default compiler
Executing gcc.exe...
gcc.exe "E:\My_Documents\Cprograms\printing.c" -o "E:\My_Documents\Cprograms\printing.exe" -ansi -traditional-cpp -I"C:\Dev-Cpp\bin" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\bin" -L"C:\Dev-Cpp\lib"
In file included from E:\My_Documents\Cprograms\printing.c:1:
C:\Dev-Cpp\include\stdio.h:210: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:211: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:212: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:213: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:218: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:218: parse error before
)' C:\Dev-Cpp\include\stdio.h: In function
int vsnprintf(...)':C:\Dev-Cpp\include\stdio.h:219:
s' undeclared (first use this function) C:\Dev-Cpp\include\stdio.h:219: (Each undeclared identifier is reported only once C:\Dev-Cpp\include\stdio.h:219: for each function it appears in.) C:\Dev-Cpp\include\stdio.h:219:
n' undeclared (first use this function)C:\Dev-Cpp\include\stdio.h:219:
format' undeclared (first use this function) C:\Dev-Cpp\include\stdio.h:219:
arg' undeclared (first use this function)C:\Dev-Cpp\include\stdio.h: At top level:
C:\Dev-Cpp\include\stdio.h:220: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:222: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:224: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:432: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:433: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:434: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:435: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:467: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:467: parse error before `)'
C:\Dev-Cpp\include\stdio.h:469: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:471: type specifier omitted for parameter
C:\Dev-Cpp\include\stdio.h:473: type specifier omitted for parameter
Execution terminated
This is the program:
include <stdio.h>
int main(void){
printf("Testing");
}
Something must have gone wrong with the installation process? Thanks a lot!
JH
Unless you have a really good reason to have -traditional-cpp set, don't! That is your problem. I would advise against -ansi as well to be honest. In fact, unless you have a specific need, and are very sure what they do, don't set any non-default options other than perhaps -Werror -Wall -Wformat.
Clifford
Hi Clifford, I tried your advise and set all compilation options to default, but the same problem exist, I am going to install a separate mingw compiler in a diffrernt folder and include the files in the directories of compiler option...
When you are asked to do something, please do not respond with just "I tried what you ask, and the problem remains", post your Basic 3 again. Remote debugging is a hard process, you need to be VERY methodical.
Wayne