Anonymous - 2002-05-05

Hello,
For a few weeks I am trying Dev-C++ together with the wxWindows-Library which seems to be a nice combination to me.
I discovered a small problem and would like to suggest a small modification to the makefile which Dev-C++ generates. The aim of the change is to add the include-path to the command-line for windres. For example all samples of the wxWindows-library rely on such inclusion. Because the modification is very small, it should not be a great problem. I see two ways to do it:
1. to take the include-path
2. to add a tab for res-includes to the directories

To demonstrate, what I mean I add a makefile, which was originally generated by Dev-C++ and a modified makefile:

This is the original makefile generated by Dev-C++:
====== Begin original makefile =====================
# Project: WxWindows internat
# Makefile created by Dev-C++ 4.9.2.0

CC   = g++.exe
WINDRES = windres.exe
OBJ  = internat.o  rsrc.o
LIBS =  -L"D:\Programmierung\Dev-C++\lib" -lwx -lole32 -lwsock32 -lcomctl32 -lctl3d32 -lgcc -lstdc++ -lshell32 -loleaut32 -ladvapi32 -luuid -lxpm
INCS =  -I"D:\Programmierung\Dev-C++\include"  -I"D:\Programmierung\Dev-C++\include\g++-3"  -I"D:\Programmierung\Dev-C++\include"
BIN  = internat.exe
CFLAGS = $(INCS) -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -fvtable-thunks -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -s -mwindows

.PHONY: clean

all: internat.exe

clean:
    rm -f $(OBJ) $(BIN)

internat.exe: $(OBJ)
    $(CC) $(OBJ) -o $(BIN) $(RES) $(LIBS) $(CFLAGS)

internat.o: internat.cpp
    $(CC) -c internat.cpp -o internat.o $(CFLAGS)

rsrc.o: rsrc.rc
    $(WINDRES) -i rsrc.rc -I rc -o rsrc.o
============== End original makefile ===================

This is the makefile with the correct include-statement for the resource-compilation
Look at the last line
================= Begin corrected makefile ================
# Project: WxWindows internat
# Makefile created by Dev-C++ 4.9.2.0

CC   = g++.exe
WINDRES = windres.exe
OBJ  = internat.o  rsrc.o
LIBS =  -L"D:\Programmierung\Dev-C++\lib" -lwx -lole32 -lwsock32 -lcomctl32 -lctl3d32 -lgcc -lstdc++ -lshell32 -loleaut32 -ladvapi32 -luuid -lxpm
INCS =  -I"D:\Programmierung\Dev-C++\include"  -I"D:\Programmierung\Dev-C++\include\g++-3"  -I"D:\Programmierung\Dev-C++\include"
BIN  = internat.exe
CFLAGS = $(INCS) -fno-rtti -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing -Wall -fvtable-thunks -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -s -mwindows

.PHONY: clean

all: internat.exe

clean:
    rm -f $(OBJ) $(BIN)

internat.exe: $(OBJ)
    $(CC) $(OBJ) -o $(BIN) $(RES) $(LIBS) $(CFLAGS)

internat.o: internat.cpp
    $(CC) -c internat.cpp -o internat.o $(CFLAGS)

rsrc.o: rsrc.rc
    $(WINDRES) -i rsrc.rc -o rsrc.o -I rc --include-dir "D:\Programmierung\Dev-C++\include"
============== End corrected makefile ==============================0