MJ1986
MJ1986

Reputation: 47

makefile compiling with c++0x

I have a program that uses string functions and requires to compile with c++0x.But I can't figure out how/where to put "-std=c++0x" my flag. I've only compiled using basic commands within makefile, so this is new to me. Here is my current makefile without the flag.

output: main.o rFunctions.o
    g++ main.o rFunctions.o -0 Recursive 

Upvotes: 1

Views: 578

Answers (1)

Pavel P
Pavel P

Reputation: 16882

You can define CXXFLAGS in your make file:

CXXFLAGS=c++0x
output: main.o rFunctions.o
    g++ main.o rFunctions.o -0 Recursive

You can also add extra flags there: CXXFLAGS=-g -Wall -std=c++0x

Upvotes: 1

Related Questions