Mar 29, 2011 ' ld returned 1 exit status ' Go into your settings and put the warning level on maximum. The compiler should be giving you line numbers, function names, etc in your warnings.
P: 4
'permission denied' 'id returned 1 exit status' im compiling with dev c++ 4.9.9.2 im using windows vista, but i have compiled and ran other programs before. pretty simple program, some parts in french, just wondering what i have to do fix it.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int x= 0; // declaration des variables et leur donne une valeur de depart '0'
int bande1 = 0; // declaration des variables et leur donne une valeur de depart '0'
int bande2 = 0; // declaration des variables et leur donne une valeur de depart '0'
int bande3 = 0; // declaration des variables et leur donne une valeur de depart '0'
float vresistance = 0; // declaration des variables et leur donne une valeur de depart '0'
float vresistance2 = 0; // declaration des variables et leur donne une valeur de depart '0'
do{
printf('n Voici le tableau des couleurs des bandes, chaque couleur est associe a un numero');
printf('Si tu veut quitter le programme tape (-1) pour la valeur de n'importe bandenn');
printf('0-Noir n' '1-Brun n' '2-Rouge n' '3-Orange n' '4-Jaune n' '5-Vert n' '6-Bleu n' '7-Violet n' '8-Gris n' '9-Blanc nnn');
printf('Quelle est la valeur de la premiere bande de couleur n');
scanf('%d',& bande1);
while(bande1 > 9 && bande1 < -1){
if(bande1 -1) {
system('PAUSE');
return(0); }
else {
printf('mauvaise entree , quelle est la valeur de la premiere bande de couleur n');
scanf('%d',& bande1);}
}
printf('Quelle est la valeur de la deuxieme bande de couleur n');
scanf('%d',&bande2);
while(bande2 > 9 && bande2 < -1){
if(bande2 -1) {
system('PAUSE');
return(0); }
else {
printf('mauvaise entree , quelle est la valeur de la deuxieme bande de couleur n');
scanf('%d',& bande2);}
}
printf('Quelle est la valeur de la troisieme bande de couleur n');
scanf('%d',&bande3);
while(bande3 > 9 && bande3 < -1){
if(bande3 -1) {
system('PAUSE');
return(0); }
else {
printf('mauvaise entree , quelle est la valeur de la troisieme bande de couleur n');
printf('la valeur de la resistance(kilo-ohms) est : %f n', vresistance2);
}
else {
printf('la valeur de la resistance (ohms) est : %f n', vresistance);
}
}while(x 0);
system('PAUSE');
return 0;
}
Hi,
I'm still a beginner for C programming. In my assignment I've encountered this problem and I know is a linker problem but I'm not sure how to solve it. I'm trying to link 3 files which 2 .c files and 1 .h file. Below are the codes for my file:
These 3 files are my codings. I hope someone can help me out. I'm stuck at his problem for long time. Thanks in advance. Appreciate your help.
5 Contributors
forum 4 Replies
11,444 Views
5 Years Discussion Span
commentLatest Postby Sean1234$Latest Post
Banfa597
I think you mean Ld returned 1 exit status.
Ld Returned 1 Exit Status Gcc
Do you really mean you tried to link the 2 c files and the h file or do you mean you compiled the c files and tried to link the resulting objects?
Error Id Returned 1 Exit Status Dev C Program
The processor of building a program is
Compile each individual source (.c) file producing an object file (.o or .obj)
Link all the object files produced in stage 1 with any require libraries
NOTE 1: you neither compile or link header (.h) files, they are included into source (.c) files and the code the contain is compiled in that manner.
NOTE 2: It is very poor practice to #include source files (.c) into other source files (.c) as you have done in your driver.c listing. However if you must/do do that then you should not separately compile the source (.c) that you included.
Error Id Returned 1 Exit Status Dev C Online
Normally the IDE handles the build process for you so it would help us to know what tools, compiler tool-chain and/or IDE you are using.