title: My program doesn't load my functions from my personal lib
body: <p>I am a technology management student and I fell in love with the C Language. I also enjoy interpretation games and decided to develop a small C program with a small dungeon embedded in it.</p>
  <p>I made the codes and when left in a single file, they worked, but I decided to divide them into multiple files and create libraries for the classes, but the program does not advance now.</p>
  <p>I will put the codes below.</p>
  <p><strong>The main code in file main.c:</strong></p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &quot;selector.h&quot;
  #include &quot;classes.h&quot;
  
  //Bloco principal de execucao / Main execution block
  int main() {
      startMenu();
      return 0;
  }
  
  int startMenu() {
      int selection;
      selection = 0;
      printf(&quot;Hello Adventurer! Welcome to C Single Dungeon\n&quot;);
      do {
          printf(&quot;Type 1 for Portuguese, 2 for English: \n&quot;);
          scanf(&quot;%d&quot;, &amp;selection);
          if (selection == 1) {
              extern auxSelection(selection);
          } else if (selection == 2) {
              extern auxSelection(selection);
          } else {
              printf(&quot;Digite uma opcao valida! /  Choose a valid option!\n\n&quot;);
              system(&quot;PAUSE&quot;);
              system(&quot;CLS&quot;);
          }
  
      } while(selection &gt; 2 || selection &lt; 1);
  }
  
  </code></pre>
  <p>The Selector Header in file selector.c</p>
  <pre><code>#include &quot;selector.h&quot;
  #include &lt;stdlib.h&gt;
  
  //call to auxiliar function
  int auxSelection(int selection);
  
  //call to Pt_BR language
  int lang_PtBR();
  
  //Call to En_US language
  int lang_EnUS();
  </code></pre>
  <p><strong>The lib selector.h:</strong></p>
  <pre><code>#ifdef SELECTOR_H
  #define SELECTOR_H
  #include &quot;classes.h&quot;
  //Funcao Auxiliar de Selecao / Acessory Selector
  int auxSelection(int selection){
      if (selection == 1){
          lang_PtBR();
      } else{
          lang_EnUS();
      }
      return 0;
  }
  
  
  //Funcao de Selecao em Portugues
  int lang_PtBR() {
      int tmp_class = 0;
      int confirmClass = 0;
      do {
          printf(&quot;Seja bem vindo ao C Single Dungeon!\n&quot;);
          printf(&quot;Escolha sua Classe:\n&quot;);
          printf(&quot;1 - Guerreiro\n2 - Mago\n&quot;);
          scanf(&quot;%d&quot;, &amp;tmp_class);
          if (tmp_class == 1) {
              printf(&quot;Guerreiros sao letais no combate corpo a corpo. Como guerreiro voce recebe os seguintes bonus:\n+2 de ataque\n+1 de defesa\n-1 de esquiva\n-2 de defesa magica\n&quot;);
              printf(&quot;Deseja mesmo ser um guerreiro?\n1 - SIM\n2 - Preciso pensar melhor...\n&quot;);
              scanf(&quot;%d&quot;, &amp;confirmClass);
              if (confirmClass == 1) {
                  extern int warriorPtBR();
              } else {
                  confirmClass = 0;
                  tmp_class = 0;
              }
          } else if (tmp_class == 2) {
              printf(&quot;Magos sao mestres no uso das forcas sobrenaturais. Como mago voce recebe os seguintes:\n+2 de ataque magico\n-1 de defesa\n+1 de esquiva\n&quot;);
              printf(&quot;Deseja mesmo ser um mago?\n1 - SIM\n2 - Preciso pensar melhor...&quot;);
              scanf(%d, &amp;confirmClass);
              if (confirmClass == 1) {
                  extern int magePtBR();
              } else {
                  confirmClass = 0;
                  tmp_class = 0;
              }
          } else {
              printf(&quot;Eu, seu narrador, sou um velho cansado, tenho dificuldade em entender algumas coisas, por favor, selecione uma das duas respostas que lhe pedi.\n&quot;);
              system(&quot;PAUSE&quot;);
              system(&quot;CLS&quot;);
              extern void lang_PtBR();
          }
  
      } while (tmp_class &gt; 2 || tmp_class &lt; 1);
      return 0;
  }
  
  //English Selection Function
  int lang_EnUS() {
      int tmp_class = 0;
      int confirmClass = 0;
      do {
          printf(&quot;Welcome to C Single Dungeon!\n&quot;);
          printf(&quot;Choose your class:\n&quot;);
          printf(&quot;1 - Warrior\n2 - Mage\n&quot;);
          scanf(&quot;%d&quot;, &amp;tmp_class);
          if (tmp_class == 1) {
              printf(&quot;Warriors are lethal in hand-to-hand combat. As a warrior you receive the following bonuses:\n+2 attack\n+1 defense\n-1 dodge\n-2 magical defense\n&quot;);
              printf(&quot;Do you really want to be a warrior?\n1 - YES\n2 - I need to think better...\n&quot;);
              scanf(&quot;%d&quot;, &amp;confirmClass);
              if (chClass == 1) {
                  extern int warriorEnUS();
              } else {
                  confirmClass = 0;
                  tmp_class = 0;
              }
          } else if (tmp_class == 2) {
              printf(&quot;Mages are masters in the use of supernatural forces. As a mage you receive the following bonuses:\n+2 magical attack\n-1 defense\n+1 dodge\n&quot;);
              printf(&quot;Do you really want to be a mage?\n1 - YES\n2 - I need to think better...&quot;);
              scanf(%d, &amp;confirmClass);
              if (confirmClass == 1) {
                  extern int mageEnUS();
              } else {
                  confirmClass = 0;
                  tmp_class = 0;
              }
          } else {
              printf(&quot;I, your narrator, am a tired old man, I have difficulty understanding some things, please select one of the two answers I asked you.\n&quot;);
              system(&quot;PAUSE&quot;);
              system(&quot;CLS&quot;);
              extern void lang_EnUS();
          }
      } while (tmp_class &gt; 2 || tmp_class &lt; 1);
      return 0;
  }
  
  #endif /* SELECTOR_H */
  </code></pre>
  <p><strong>The classes header in classes.c:</strong></p>
  <pre><code>#include &quot;classes.h&quot;
  #include &lt;stdlib.h&gt;
  
  //Funco para invocar e selecionar a classe de guerreiro, em lingua portuguesa
  int warriorPtBR();
  
  //Function to summon and select the warrior class in english language
  int warriorEnUS();
  
  //Funcao para invocar e selecionar a classe de mago, em lingua portuguesa
  int magePtBR();
  
  //Function to summon and select the mage class in english language
  int mageEnUS();
  </code></pre>
  <p><strong>The classes lib in classes.h:</strong></p>
  <pre><code>#ifdef CLASSES_H
  #define CLASSES_H
  
  int warriorPtBR() {
      int atk = 3;
      int magicalAtk = 0;
      int defense = 3;
      int magicalDefense = 0;
      int dodge = 1;
      int healthPoints = 8;
  
      printf(&quot;Ao finalmente se decidir, o velho contador de historias em sua frente da um sorriso e lhe oferece uma caneca que contem um liquido borbulhante. Esta frio e voce toma, pensando em se aquecer.\n&quot;);
      printf(&quot;\nSeus pensamentos sao interrompidos quase que imediatamente, uma dor repentina surge na base da sua nuca e tudo fica escuro...\n&quot;);
  }
  
  int warriorEnUS() {
      int atk = 3;
      int magicalAtk = 0;
      int defense = 3;
      int magicalDefense = 0;
      int dodge = 1;
      int healthPoints = 8;
  
      printf(&quot;When you finally make up your mind, the old storyteller in front of you smiles and offers you a mug that contains a bubbly liquid. It's cold and you drink it, thinking to warm up.\n&quot;);
      printf(&quot;\nYour thoughts are interrupted almost immediately, a sudden pain appears at the base of your neck and everything goes dark...\n&quot;);
  }
  
  int magePtBR() {
      int atk = 1;
      int magicalAtk = 2;
      int defense = 1;
      int magicalDefense = 2;
      int dodge = 2;
      int healthPoints = 5;
  
      printf(&quot;Ao finalmente se decidir, o velho contador de historias em sua frente da um sorriso e lhe oferece uma caneca que contem um liquido borbulhante. Esta frio e voce toma, pensando em se aquecer.\n&quot;);
      printf(&quot;\nSeus pensamentos sao interrompidos quase que imediatamente, você sente uma energia potente correndo em suas veias, em seguida uma dor repentina surge na base da sua nuca e tudo fica escuro...\n&quot;);
  }
  
  int mageEnUS() {
      int atk = 1;
      int magicalAtk = 2;
      int defense = 1;
      int magicalDefense = 2;
      int dodge = 2;
      int healthPoints = 5;
      printf(&quot;Finally decide, the old storyteller in front of you a smile and offers you a mug that contains a bubbling liquid. It's cold and you take it, thinking of warming yourself. \ n&quot;);
      printf(&quot;\ nseus thoughts are interrupted almost immediately, you feel a potent energy running in your veins, then a sudden pain appears at the base of your neck and everything is dark ... \ n&quot;);
  }
  
  #endif /* CLASSES_H */
  </code></pre>
  <p><strong>My Current output:</strong></p>
  <p>Hello Adventurer! Welcome to C Single Dungeon
  Type 1 for Portuguese, 2 for English:</p>
  <p><strong>When I select one of the options:</strong></p>
  <p>Hello Adventurer! Welcome to C Single Dungeon
  Type 1 for Portuguese, 2 for English:
  1</p>
  <hr />
  <p>Process exited after 30.72 seconds with return value 0
  Pressione qualquer tecla para continuar. . .</p>
  <p>Again, thank you very much. I hope I created my first question here at Stack Overflow in an organized way.</p>
  <p>I appreciate all kinds of tips and advice that you can give me.</p>