hi oBFusCATed ,
Thanks for your reply, i totally missed that. Its compiling but with following errors.
Please can you help me out with these errors too.thanks again??
Regards
rahul
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text+0x18): undefined reference to `_sbrk'
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-writer.o): In function `_write_r':
writer.c:(.text+0x20): undefined reference to `_write'
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-closer.o): In function `_close_r':
closer.c:(.text+0x18): undefined reference to `_close'
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-fstatr.o): In function `_fstat_r':
fstatr.c:(.text+0x1c): undefined reference to `_fstat'
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-isattyr.o): In function `_isatty_r':
isattyr.c:(.text+0x18): undefined reference to `_isatty'
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-lseekr.o): In function `_lseek_r':
lseekr.c:(.text+0x20): undefined reference to `_lseek'
D:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\lib\libc.a(lib_a-readr.o): In function `_read_r':
readr.c:(.text+0x20): undefined reference to `_read'
GNU ld (Sourcery G++ Lite 2009q3-68) 2.19.51.20090709
Process terminated with status 1 (0 minutes, 0 seconds)
7 errors, 0 warnings
Hi,
My program consists of the following code. When i comment the printf syntax, then it rebuilds without error. I have already included the stdanrd libraries for C. Should it even give an error??
Regards
Rahul
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
a = 1 ;
printf("Hello world!\n");
return 0;
}
Hi,
My program consists of the following code. When i comment the printf syntax, then it rebuilds without error. I have already included the stdanrd libraries for C. Should it even give an error??
Regards
Rahul
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
a = 1 ;
printf("Hello world!\n");
return 0;
}
try it with std::cout instead of printf.
#include <iostream> // cout is a member of iostream
using namespace std; // allows cout to be used instead of std::cout
int main()
{
int a = 1;
cout << "Hello World\n";
return 0;
}
[edit: removed excess whitespace from quote]