Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using gcc to compile C file
#14
Quote:-Os -s -Wall -static-libgcc -static-libstdc++ -static -fomit-frame-pointer -luser32 -lgdi32 -lshell32
@JRace, I looked at the compiler options in your bat file and found them a bit confusing. The description of the individual options for GCC can be found here: 
GCC - Compiler Options

Regarding -fomit-frame-pointer: "Omit the frame pointer in functions that do not require one. This eliminates the instructions for saving, setting up, and restoring the frame pointer."
https://gcc.gnu.org/onlinedocs/gcc/Optim...me-pointer

Optimization: "Optimize. Compile optimization requires a little more time and a lot more memory for a large function.
With -O, the compiler tries to reduce code size and execution time without performing optimizations that take a lot of compile time."

-Wall makes sense because the option displays warnings if the source code was compiled but contains imperfections.

In my opinion, something is wrong there. It seems to me that some options interfere with each other, and I can't find this one in the description: -luser32 -lgdi32 -lshell32.

I doubt that it makes sense to compile every file with all the specified compiler options.
Reply


Messages In This Thread
Using gcc to compile C file - by aurel - 04-18-2024, 07:31 PM
RE: Using gcc to compile C file - by a740g - 04-18-2024, 07:37 PM
RE: Using gcc to compile C file - by Kernelpanic - 04-18-2024, 09:18 PM
RE: Using gcc to compile C file - by aurel - 04-19-2024, 06:49 AM
RE: Using gcc to compile C file - by Kernelpanic - 04-19-2024, 08:16 AM
RE: Using gcc to compile C file - by aurel - 04-19-2024, 08:12 AM
RE: Using gcc to compile C file - by Kernelpanic - 04-19-2024, 07:06 PM
RE: Using gcc to compile C file - by aurel - 04-19-2024, 11:47 AM
RE: Using gcc to compile C file - by Kernelpanic - 04-19-2024, 02:00 PM
RE: Using gcc to compile C file - by JRace - 04-20-2024, 12:12 AM
RE: Using gcc to compile C file - by JRace - 04-20-2024, 12:31 AM
RE: Using gcc to compile C file - by bplus - 04-20-2024, 01:27 PM
RE: Using gcc to compile C file - by JRace - 04-20-2024, 03:35 PM
RE: Using gcc to compile C file - by Kernelpanic - 04-20-2024, 07:02 PM
RE: Using gcc to compile C file - by JRace - 04-20-2024, 08:06 PM
RE: Using gcc to compile C file - by Kernelpanic - 04-20-2024, 09:06 PM
RE: Using gcc to compile C file - by JRace - 04-20-2024, 10:11 PM
RE: Using gcc to compile C file - by Kernelpanic - 04-21-2024, 07:22 PM
RE: Using gcc to compile C file - by JRace - 04-21-2024, 07:59 PM
RE: Using gcc to compile C file - by TerryRitchie - 04-22-2024, 02:20 AM
RE: Using gcc to compile C file - by JRace - 04-22-2024, 03:22 PM
RE: Using gcc to compile C file - by aurel - 04-22-2024, 03:41 PM
RE: Using gcc to compile C file - by aurel - 04-22-2024, 03:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can anyone tell me why this won't compile? CMR 11 1,643 04-10-2025, 11:45 AM
Last Post: bplus
  Can't compile .bas files PhilOfPerth 11 2,010 01-03-2023, 02:21 AM
Last Post: PhilOfPerth

Forum Jump:


Users browsing this thread: 1 Guest(s)