Open mansoor00727 opened 1 year ago
changing the make file to this may make code work for you :> ` CXX = g++ CXXFLAGS = -std=c++11 -Wall -O3 -I/usr/include LDFLAGS = -lm -larmadillo
OBJ = solver.o altproj.o game.o tests.o
all: sudoku
sudoku: $(OBJ) main.o $(CXX) main.o $(OBJ) -o sudoku $(CXXFLAGS) $(LDFLAGS)
debug: $(OBJ) debug.o $(CXX) debug.o $(OBJ) -o debug $(CXXFLAGS) $(LDFLAGS)
%.o: %.cpp $(CXX) -c $< -o $@ $(CXXFLAGS)
clean: rm -f $(OBJ) main.o debug.o sudoku debug `
debug.cpp has a main function as well which on debugging gives a linked error saying that main is already defined. please can you help?