Hello,
1)
I succesfully installed the Borland C++ builder and integrated with textpad.
However when i try to run a simple Hello.c file - i get the following errors as below :
2)
The Hello.c file :
#include <stdio.h>
int main()
{
printf("Hello, world\n");
return 0;
}
3)
The output after compiling :
Error E2209 D:\TC\HELLO.C 5: Unable to open include file 'stdio.h'
Warning W8065 D:\TC\HELLO.C 9: Call to function 'printf' with no prototype in function main
*** 1 errors in Compile ***
Tool completed with exit code 1
4)
I tired using expressions:
a)^\(Error\|Warning\) [A-Z][0-9]+ \(.+\) \([0-9]+\): with File= 2 and Line = 3
and
b)\(.:[^:]+\):\([0-9]+\): with File = 1 and Line = 2
I got the same error - i also verified that that 'stdio.h' header file was present indeed.
Could anyone throw light on this - i am going crazy with this ....
Thanks in advance
Smitha
Problem compiling C/C++ files
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Andreas
Re: Problem compiling C/C++ files
for the stdio.h not found:
check your environment variables, most compilers expect to find one called INCLUDE or LIBINC which contains paths to the directories with the .h files.
If you are not sure about that, check Borland documentation what it expects.
4b) replace 3rd colon by a space (there is no colon between filename and line number):
\(.:[^:]+\) \([0-9]+\):
check your environment variables, most compilers expect to find one called INCLUDE or LIBINC which contains paths to the directories with the .h files.
If you are not sure about that, check Borland documentation what it expects.
4b) replace 3rd colon by a space (there is no colon between filename and line number):
\(.:[^:]+\) \([0-9]+\):
-
Smitha
Re: Problem compiling C/C++ files
Thank for the prompt response Andreas.
But well - even with a C++ file that has a : #include <iostream.h>
i get a compilation error as below:
Error E2209 D:\TC\INTRO1.CPP 3: Unable to open include file 'iostream.h'
Error E2451 D:\TC\INTRO1.CPP 9: Undefined symbol 'cout' in function main()
Error E2451 D:\TC\INTRO1.CPP 10: Undefined symbol 'cin' in function main()
Well i do not figure out why the compilation problem - these are the standard header files??
Thanks again
Smitha
But well - even with a C++ file that has a : #include <iostream.h>
i get a compilation error as below:
Error E2209 D:\TC\INTRO1.CPP 3: Unable to open include file 'iostream.h'
Error E2451 D:\TC\INTRO1.CPP 9: Undefined symbol 'cout' in function main()
Error E2451 D:\TC\INTRO1.CPP 10: Undefined symbol 'cin' in function main()
Well i do not figure out why the compilation problem - these are the standard header files??
Thanks again
Smitha
-
Andreas
Re: Problem compiling C/C++ files
Yes, but the compiler has to know where they are - you could have provided your own ones instead of the provided ones so the environment variables have to be set.
Look at the compiler manual how to set them.
Look at the compiler manual how to set them.
-
Smitha
Re: Problem compiling C/C++ files
Well Andreas,i did try gain with the below include statement :# include "d:\borland\bcc55\include\stdio.h"
Now i get the below errors - all in the stdio.h file :
Could you/anyone throw more light on the actual problem.
Also it would help if u could point me to the compiler manual that you were referring to for theBolrnad C++ builder??
Thanks again.
Smitha
Error E2209 d:\borland\bcc55\include\stdio.h 22: Unable to open include file '_stddef.h'
Error E2209 d:\borland\bcc55\include\stdio.h 26: Unable to open include file '_nfile.h'
Error E2139 d:\borland\bcc55\include\stdio.h 109: Declaration missing ;
Error E2141 d:\borland\bcc55\include\stdio.h 131: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 132: Type mismatch in redeclaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 132: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 141: Type mismatch in redeclaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 141: Declaration syntax error
Error E2449 d:\borland\bcc55\include\stdio.h 150: Size of '_RTLENTRY' is unknown or zero
Error E2356 d:\borland\bcc55\include\stdio.h 150: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 141: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 150: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 151: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 150: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 151: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 152: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 151: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 152: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 153: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 152: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 153: Declaration syntax error
Error E2141 d:\borland\bcc55\include\stdio.h 154: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 155: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 153: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 155: Declaration syntax error
Error E2228 d:\borland\bcc55\include\stdio.h 155: Too many error or warning messages
*** 26 errors in Compile ***
Tool completed with exit code 1
Now i get the below errors - all in the stdio.h file :
Could you/anyone throw more light on the actual problem.
Also it would help if u could point me to the compiler manual that you were referring to for theBolrnad C++ builder??
Thanks again.
Smitha
Error E2209 d:\borland\bcc55\include\stdio.h 22: Unable to open include file '_stddef.h'
Error E2209 d:\borland\bcc55\include\stdio.h 26: Unable to open include file '_nfile.h'
Error E2139 d:\borland\bcc55\include\stdio.h 109: Declaration missing ;
Error E2141 d:\borland\bcc55\include\stdio.h 131: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 132: Type mismatch in redeclaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 132: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 141: Type mismatch in redeclaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 141: Declaration syntax error
Error E2449 d:\borland\bcc55\include\stdio.h 150: Size of '_RTLENTRY' is unknown or zero
Error E2356 d:\borland\bcc55\include\stdio.h 150: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 141: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 150: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 151: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 150: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 151: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 152: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 151: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 152: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 153: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 152: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 153: Declaration syntax error
Error E2141 d:\borland\bcc55\include\stdio.h 154: Declaration syntax error
Error E2356 d:\borland\bcc55\include\stdio.h 155: Type mismatch in redeclaration of '_RTLENTRY'
Error E2344 d:\borland\bcc55\include\stdio.h 153: Earlier declaration of '_RTLENTRY'
Error E2141 d:\borland\bcc55\include\stdio.h 155: Declaration syntax error
Error E2228 d:\borland\bcc55\include\stdio.h 155: Too many error or warning messages
*** 26 errors in Compile ***
Tool completed with exit code 1
-
Andreas
Re: Problem compiling C/C++ files
You should set up an Environment variable INCLUDE or LIBINC (or whatever your compiler demands), otherwise it WILL NOT WORK!