Skip to content
Can I change compiler switches?
Profile icon
Jack_AdrianAdr1

Is it possible to modify/add to the compiler switches for C++? Or are they fixed on this platform?

You are viewing a single comment. View All
Profile icon
PedroSerra

if you place a "Makefile" with the compilation rules it calls make when you press play. There are plenty of Makefile examples out there but yet here's an example where I have included the command to run the program after compilation.

CC=gcc
CFLAGS=-Wall -Wpedantic -Wextra -std=c99 -Wvla
LFLAGS=-lncurses
SOURCE=$(wildcard *.c)
TARGET=main

all:
$(CC) $(CFLAGS) -o $(TARGET) $(SOURCE) $(LFLAGS)
./$(TARGET)