I've been trying to compile a program that will have an icon linked with it, on Windows. Based off of my recent research, since I've never done this before, You would make a .RC file with the info of the program, including icons, which you would then use windres to turn it into a .RES file, which you would then link when compiling:
g++ program.cpp -o program.exe
would become
g++ program.cpp program.res -o program.exe
I'm guessing this is the right way to do it, but I'm not sure because when I try to compile the program, it gives the error:
program.res: file not recognized: file format not recognized
collect2.exe error: ld returned 1 exit status
What can I do to fix this? I've seen people say that if you're compiling 32-bit programs, which I believe I am, you can add parameters to turn it into a .RES file that is meant for compiling 32-bit programs. I've tried this but, it gave the exact same issue, so I don't think that that is the problem.