i am getting errors while compiling a simple C program.
#include<stdio.h>
void main()
{
int i=5;
printf("I value is %d",i);
}
The Errors are ..
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status
my gcc version is..
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
Can anyone know what my problem is ?
Following the tutorial below, the suggested to insert the path /usr/bin to the environment variable in the following way.
export PATH="/usr/bin:$PATH".
https://askubuntu.com/questions/347466/configure-error-c-compiler-cannot-create-executables
this worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With