开发者

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

开发者 https://www.devze.com 2023-03-05 03:20 出处:网络
I am new to using GNU make. I have a makefile as below: CFLAGS = -c -I $(WXWIN)\\include\\ hello: main.o

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\


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
0

精彩评论

暂无评论...
验证码 换一张
取 消