collect2: error: ld returned 1 exit status exit status 1 Erreur de compilation

I'm at my first project on arduino and I can't figure out what the problem is with my coding. It says

collect2: error: ld returned 1 exit status
exit status 1
Erreur de compilation pour la carte Arduino/Genuino Uno


Ceci est mon premier projet sur arduino et je ne trouve pas mon erreur de codage.

Here's my code / Voici mon code:

void loop(){
int pinUn = 1;
int pinDeux =2;
pinMode (pinUn , OUTPUT);
pinMode (pinDeux , INPUT);
if (pinDeux == HIGH){
analogWrite (pinUn , HIGH) ;
delay (500);
analogWrite (pinUn , LOW);
delay(1000);
}
else{
for(int pwr=0 ; pwr < 200 ; pwr ++ ){
analogWrite(pinUn , pwr);
};
};
}

(deleted)

I added up a setup, now Arduino do not point any error but when i upload it it does not work, the led stays off

void setup(){
int pinUn = 1;
int pinDeux =2;
pinMode (pinUn , OUTPUT);
pinMode (pinDeux , INPUT);
}
void loop(){
int pinUn = 1;
int pinDeux =2;
pinMode (pinUn , OUTPUT);
pinMode (pinDeux , INPUT);
if (pinDeux == HIGH){
analogWrite (pinUn , HIGH) ;
delay (500);
analogWrite (pinUn , LOW);
delay(1000);
}
else{
for(int pwr=0 ; pwr < 200 ; pwr ++ ){
analogWrite(pinUn , pwr);
};
};
}

hello

ICI

int pinUn = A0;//attention, ce n'est plus 1 mais A0
  int pinDeux =2;
  
  void setup()
  {

  pinMode (pinUn , OUTPUT);
  pinMode (pinDeux , INPUT);
}
void loop(){
  
   if (pinDeux == HIGH)
   {
    analogWrite (pinUn , HIGH) ;
    delay (500);
    analogWrite (pinUn , LOW);
    delay(1000);
  }
  else
  {
    for(int pwr=0 ; pwr < 200 ; pwr ++ )
    {
    analogWrite(pinUn , pwr);
    };
   };
  }

/*I've try your code and it still dont work, i tried to fix it again... still wont work. Here's where i'm at:

J'ai essayé ton code, ça ne fonctionne toujours pas, j'ai essayer de résoudre le problème... voici ou j'en suis:

*/

int pinUn = A0;
int pinDeux =2;

void setup()
{

pinMode (pinUn , OUTPUT);
pinMode (pinDeux , INPUT);
}
void loop(){

if (pinDeux == HIGH)
{
analogWrite (pinUn , HIGH) ;
delay (500);
analogWrite (pinUn , LOW);
delay(500);
}
else
{
for(int pwr=0 ; pwr < 1000 ; pwr ++ )
{
analogWrite(pinUn , pwr);
delay(1000);
if(pwr >= 1000){
int pwr = 0;

}
}
};
};