I downloaded a raylib repository and added it as a static library to my project folder, then I made a short test programm but when I tried to compile and link it, it showed "undefined reference to function". My Test Programm Main.cpp is:
#include <iostream>
#include <raylib.h>
using namespace std;
  
int main()
{
    
    InitWindow(800, 500, "Elden-Tactic");
    do{
        BeginDrawing();
            ClearBackground(RAYWHITE);
            DrawRectangle(10, 50, 100, 100, BLACK);
        EndDrawing();
    }while(!WindowShouldClose());
    
}
My Command Prompt Lines to build it are:
g++ -Wall -I C:/Users/j-bro/raylib-Test/raylib-4/include/ -c Main.cpp //Compile
g++ -Wall -L C:/Users/j-bro/raylib-Test/raylib-4/lib -lraylib -o Main Main.o //Link
I am quite a newbie when it comes to compile things not just with one click or working with Command Lines etc, so please considerate that. Did I forget something or wrote anything wrong? I also have Include Path edited so it can find both, the Header File and the Static Library.
I tried different Command Prompt Lines as well that I could find on the Internet, but nothing seemed to work.
 
    