How to execute a c++ prog in linux environment by using make ?
Printable View
How to execute a c++ prog in linux environment by using make ?
[QUOTE=dgopinath_1974;21351]How to execute a c++ prog in linux environment by using make ?[/QUOTE]
# export CC=gcc32
# export CPP=g++32
# ./configure
Please note, it only worked for me when I used CXX (C++ compiler) instead of CPP (pre-processor).
Hi,
c++ programs compiled using GCC.
Make is build script to create an executable/shared library
For More info "http://www.gnu.org/software/make/"
[url]http://www.gnu.org/software/make/manual/make.html[/url]
[url]http://gcc.gnu.org/[/url]
# The following lines are required because standard make does not
# recognize the Objective-C .m suffix.
.SUFFIXES: .o .m
.m.o:
$(CC) -c $(CFLAGS) $<
# Macros
CC = gcc
CFLAGS = -g
LIBS = -lobjc
# Explicit rule
hist: $(OBJ)
$(CC) $(CFLAGS) -o main main.c