This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
MFC Dialog based application compilation problem
- To: cygwin at sourceware dot cygnus dot com
- Subject: MFC Dialog based application compilation problem
- From: Balasubramanian <bala at sasi dot com>
- Date: Sun, 28 May 2000 22:30:55 +0530 (IST)
Hi,
The Makefile here is for a console application. But i am using the same
make file to do a MFC dialog based application and i am failing because of
linking problem. I think i have to include some DLL's or some libraries
for this. Pl let me know what to do and how to change this makefile. May
be a sample app example will do. thanks.
regards
Bala
#
# $RCSfile: GNUmakefile,v $
# $Revision: 1.1 $
# $Date: 2000/03/14 16:40:52 $
# $Author: kishore $
# $State: Exp $
#
# Language : GNU make
# Author(s) : Krishna Kishore
# --------------------------------------------------------------------
# Makefile for the Control channel Interface Applicaton
# --------------------------------------------------------------------
# Standard target declarations.
.PHONY : default all clean cleaner realclean FORCE
default : all
FORCE :
# Compiler Options
CC_OPTIONS = -nologo -ML -W3
CPP_MACROS = -D_M_IX86 -DWIN32 -DNDEBUG -D_CONSOLE -D_MBCS
CC_OPTFLAGS = -O2 -GX
# Common options.
# Include paths.
INCFLAGS += -I.\
# Include paths for VC98 for gcc to find the dependencies.
INCFLAGS += \
$(subst c:,-Ic:,$(subst C:,-IC:,$(subst ;, ,$(subst \,/, $(INCLUDE)))))
#
# Compile on DOS of Unix.
#
GCC = gcc
ifdef COMSPEC
CC = cl
LD = link
else
CC = i386-pc-mingw32-gcc
AR = i386-pc-mingw32-ar
AR = i386-pc-mingw32-as
DLLTOOL = i386-pc-mingw32-dlltool
endif
# Construct the flags. Extra CFLAGS can be specified on the command
# line (for debugging and optimization).
override CFLAGS += $(CC_OPTIONS) $(CPP_MACROS) $(CC_OPTFLAGS)
# File collections.
# Test program.
SOURCES = x_win_cntrl_chnl.cpp x_win_tifs_mux_demux.cpp ../test/test_ccif.cpp
# Other source files
OTHER_SOURCES = ../../common/src/x_win_squeue.cpp
# Libraries.
LDLIBS = wsock32.lib kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib \
shell32.lib ole32.lib oleaut32.lib uuid.lib \
odbc32.lib odbccp32.lib wsock32.lib kernel32.lib \
user32.lib gdi32.lib winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib \
oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
-nologo -machine:I386
# Objects corresponding to the sources.
OBJECTS = $(SOURCES:.cpp=.obj)
OTHER_OBJECTS = $(OTHER_SOURCES:.cpp=.obj)
# Executables.
APPLICATION = ../test/test_ccif.exe
# All dependency makefiles.
DEPMKS = x_win_cntrl_chnl.d x_win_tifs_mux_demux.d ../test/test_ccif.d
all : $(APPLICATION)
# Include the dependencies always after the default target that
# is 'all'
# Include the dependency file, but only if the targets are not
# 'realclean' or 'clean' or any other clean_x.o object.
ifeq ($(MAKECMDGOALS),realclean)
else
ifeq ($(MAKECMDGOALS),clean)
else
include $(DEPMKS)
endif
endif
$(APPLICATION) : $(OBJECTS)
@ echo Linking $?
@ $(CC) $(CFLAGS) $(LDFLAGS) -Fe$@ $(OBJECTS) $(OTHER_OBJECTS) \
-link $(LDLIBS)
$(OBJECTS) : %.obj : %.cpp
@ echo Compiling $<
@ $(CC) $(CFLAGS) $(INCFLAGS) -c -Fo$@ $<
%.d : %.cpp
@ echo Making dependencies for $<
@ $(SHELL) -ec '$(GCC) -MM $(CPP_MACROS) $(INCFLAGS) $< | \
sed '\''1s/.o/.obj/'\'' | \
sed '\''1s/^/$@ /'\'' | \
sed '\''s/
//g'\'' > $@'
clean :
$(RM) $(OBJECTS)
cleaner : clean
$(RM) $(APPLICATION)
realclean : cleaner
$(RM) $(DEPMKS)
# End.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com