Tours
Tours

Reputation: 89

How can I write a mingw-make makefile on Windows?

I am new to using GNU make. I have a makefile as below:

CFLAGS = -c -I $(WXWIN)\include\

hello: main.o

main.o:main.cpp

    gcc -c main.cpp

clean:

    rm main.o

When I run make command in console it can't find the header file "wx/wx.h". Its location: $(WXWIN)=D:\wxWidgets\

Upvotes: 0

Views: 1161

Answers (1)

Paul R
Paul R

Reputation: 212979

Change your makefile as follows:

CFLAGS = -c -I $(WXWIN)\include

hello: main.o

main.o: main.cpp
    gcc $(CFLAGS) main.cpp

clean:
    rm main.o

Upvotes: 1

Related Questions