[Dev-C++] ok, better formulation of the problem
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: P.T. W. M. <pt...@ea...> - 2003-12-29 12:59:50
|
Using this hand modified makefile:
CPP = g++.exe
CC = mingw32-gcc.exe
WINDRES = windres.exe
RES = X01_private.res
OBJ = object/main.o $(RES)
LINKOBJ = source/main.o $(RES)
LIBS = -L"C:/bin/cpp/lib" -mwindows
INCS = -I"C:/bin/cpp/include"
CXXINCS
= -I"C:/bin/cpp/include/c++" -I"C:/bin/cpp/include/c++/mingw32"
-I"C:/bin/cpp/include/c++/backward" -I"C:/bin/cpp/include"
BIN = exe/X01.exe
CXXFLAGS = $(CXXINCS) -std=gnu99
CFLAGS = $(INCS) -std=gnu99
.PHONY: all all-before all-after clean clean-custom
all: all-before exe/X01.exe all-after
clean: clean-custom
rm -f $(OBJ) $(BIN)
$(BIN): $(LINKOBJ)
$(CPP) $(LINKOBJ) -o "exe\X01.exe" $(LIBS)
object/main.s: source/main.cpp
$(CPP) -c source/main.cpp -S $(CXXFLAGS)
X01_private.res: X01_private.rc
$(WINDRES) -i X01_private.rc -I rc -o X01_private.res -O coff
on the simple attached (automatically generated app) main.cpp where I
completely removed the main.o lines and inserted a rule to make the asm
source yields this console output:
C:\Documents and Settings\patrick\My Documents\Shop>make
g++ -I"C:/bin/cpp/include/c++" -I"C:/bin/cpp/includ
=gnu99 -c -o source/main.o source/main.cpp
In file included from c:/bin/MinGW/include/objbase.h
from c:/bin/MinGW/include/ole2.h:9,
from c:/bin/MinGW/include/windows.h
from source/main.cpp:1:
c:/bin/MinGW/include/rpcndr.h:123: non-local functio
NDRSContextMarshall(<anonymous struct>*, void*, v
anonymous type
c:/bin/MinGW/include/rpcndr.h:124: non-local functio
NDRSContextUnmarshall(void*, long unsigned int)'
c:/bin/MinGW/include/rpcndr.h:315: non-local functio
NdrServerContextMarshall(_MIDL_STUB_MESSAGE*, <an
(*)(void*))' uses anonymous type
c:/bin/MinGW/include/rpcndr.h:336: non-local functio
NdrServerContextUnmarshall(_MIDL_STUB_MESSAGE*)'
make: *** [source/main.o] Error 1
C:\Documents and Settings\patrick\My Documents\Shop>
*********************** output end
This error seems strange to me as I'm not asking for any .o file, and in
fact deleted the main.o rule to see if I could get rid of this error, which
was stopping me inside the GUI as well.
Again, my goal is simple. I'd like to just be able to turn on the -S
option and then get .s files as output, rather than asm in .o files.
Right now, I'm doing this merely to groke the GUI and see the relationship
to the Makefile.win it creates, etc.
Anyway, if anyone can set me straight about this I'm grateful. It just
does not appear to be working the way I would expect. I notice that in the
Makefile.win created by Dev-Cpp, that it does not use a macro for the .o rule.
I assume what I want to do is possible with a standard makefile, and
therefore should be possible with the Dev-Cpp GUI. Maybe I need to
manually enter an additional rule?
Patrick |