Menu

#843 Error in building file?(not c code troubleshooting)

Undefined
invalid
None
Undefined
2019-06-15
2019-06-14
No

hi. why does my compiler keep refering to math.h even though i didnt #include it in and even deleted it?
it just shows 50+ build errors

include <stdio.h></stdio.h>

void main (void)
{//main start

printf("Hello World");
}//main end
is what i tried to compile, this was the build error log
||=== Build: Debug in mini project 2 (compiler: GNU GCC Compiler) ===|
c:\mingw\include\math.h||In function 'main':|
c:\mingw\include\math.h|17|error: expected declaration specifiers before '#pragma'|
c:\mingw\include\math.h|82|error: expected declaration specifiers before ';' token|
c:\mingw\include\math.h|99|error: storage class specified for parameter '_imp_HUGE'|
c:\mingw\include\math.h|137|error: unknown type name '_locale_t'|
c:\mingw\include\math.h|187|error: redefinition of parameter '_hypotf'|
c:\mingw\include\math.h|161|note: previous definition of '_hypotf' was here|
c:\mingw\include\math.h|202|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|209|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|210|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|211|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|215|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|221|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|314|error: storage class specified for parameter '
fpclassifyf'|
c:\mingw\include\math.h|315|error: storage class specified for parameter 'fpclassify'|
c:\mingw\include\math.h|317|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|338|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|347|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|356|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|373|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|379|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|385|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|395|error: storage class specified for parameter 'exp2'|
c:\mingw\include\math.h|396|error: storage class specified for parameter 'exp2f'|
c:\mingw\include\math.h|397|error: storage class specified for parameter 'exp2l'|
c:\mingw\include\math.h|401|error: storage class specified for parameter 'ilogb'|
c:\mingw\include\math.h|402|error: storage class specified for parameter 'ilogbf'|
c:\mingw\include\math.h|403|error: storage class specified for parameter 'ilogbl'|
c:\mingw\include\math.h|405|error: storage class specified for parameter 'log1p'|
c:\mingw\include\math.h|406|error: storage class specified for parameter 'log1pf'|
c:\mingw\include\math.h|407|error: storage class specified for parameter 'log1pl'|
c:\mingw\include\math.h|409|error: storage class specified for parameter 'log2'|
c:\mingw\include\math.h|410|error: storage class specified for parameter 'log2f'|
c:\mingw\include\math.h|411|error: storage class specified for parameter 'log2l'|
c:\mingw\include\math.h|413|error: storage class specified for parameter 'logb'|
c:\mingw\include\math.h|414|error: storage class specified for parameter 'logbf'|
c:\mingw\include\math.h|415|error: storage class specified for parameter 'logbl'|
c:\mingw\include\math.h|418|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|426|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|434|error: expected '=', ',', ';', 'asm' or '
attribute' before '{' token|
c:\mingw\include\math.h|441|error: storage class specified for parameter 'modfl'|
c:\mingw\include\math.h|444|error: storage class specified for parameter 'scalbn'|
c:\mingw\include\math.h|445|error: storage class specified for parameter 'scalbnf'|
c:\mingw\include\math.h|446|error: storage class specified for parameter 'scalbnl'|
c:\mingw\include\math.h|448|error: storage class specified for parameter 'scalbln'|
c:\mingw\include\math.h|449|error: storage class specified for parameter 'scalblnf'|
c:\mingw\include\math.h|450|error: storage class specified for parameter 'scalblnl'|
c:\mingw\include\math.h|454|error: storage class specified for parameter 'cbrt'|
c:\mingw\include\math.h|455|error: storage class specified for parameter 'cbrtf'|
c:\mingw\include\math.h|456|error: storage class specified for parameter 'cbrtl'|
c:\mingw\include\math.h|459|error: expected '=', ',', ';', 'asm' or '
attribute__' before '{' token|
c:\mingw\include\math.h|460|error: storage class specified for parameter 'hypotl'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
help tnks

Discussion

  • Lieven de Cock

    Lieven de Cock - 2019-06-14

    this is completely invalid syntax :
    include <stdio.h></stdio.h>

    C/C++ is not html. I would suggest you read a book on C/C++ first ;-)

     
  • tan zheng boon

    tan zheng boon - 2019-06-14

    oh, the paste was not text only. my code was
    (#)include <stdio.h>
    void main (void)
    {//main start</stdio.h>

    printf("Hello World");
    }//main end
    idk why the pound isnt showing

     
    • Miguel Gimenez

      Miguel Gimenez - 2019-06-14

      Next time use the code tag (fourth icon above when editing) so your code is not interpreted as formatting tags by the editor.

       

      Last edit: Miguel Gimenez 2019-06-14
  • Lieven de Cock

    Lieven de Cock - 2019-06-14

    ensure you have setup you compiler corectly, C/C++ headers can include others, so well possible that stdio is including math for example. It seems to point then in the direciton that your compiler, or include paths are not setup correctly ?

     
  • tan zheng boon

    tan zheng boon - 2019-06-14

    oh my bad, thank you for all your advice

     
  • Teodor Petrov

    Teodor Petrov - 2019-06-15
    • status: open --> invalid
    • assigned_to: Teodor Petrov
     
  • Teodor Petrov

    Teodor Petrov - 2019-06-15

    Broken compiler, closing as invalid...

     

Log in to post a comment.