This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Build configtool against wxWindows 2.4.0 using Cygwin GCC


This patch enables the wxWindows version of the eCos configtool to be
built using recent versions of Cygwin GCC.

John Dallaway
eCosCentric Limited

--cut here--

Index: standalone/wxwin/appsettings.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/appsettings.cpp,v
retrieving revision 1.9
diff -u -5 -r1.9 appsettings.cpp
--- standalone/wxwin/appsettings.cpp	18 Mar 2003 17:04:32 -0000	1.9
+++ standalone/wxwin/appsettings.cpp	19 Mar 2003 17:24:32 -0000
@@ -73,11 +73,11 @@
 
 // For SystemInfo
 #ifdef __WXMSW__
 #include <windows.h>
 #include "wx/msw/winundef.h"
-#if defined(GetTempPath) && !defined(__CYGWIN__)
+#ifdef GetTempPath
 #undef GetTempPath
 #endif
 #endif
 
 /*
Index: standalone/wxwin/configtool.rc
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtool.rc,v
retrieving revision 1.2
diff -u -5 -r1.2 configtool.rc
--- standalone/wxwin/configtool.rc	18 Mar 2003 17:04:32 -0000	1.2
+++ standalone/wxwin/configtool.rc	19 Mar 2003 17:24:32 -0000
@@ -42,6 +42,6 @@
 radiooff_dis            ICON  "bitmaps/radiooff_dis.ico"
 text                    ICON  "bitmaps/text.ico"
 text_dis                ICON  "bitmaps/text_dis.ico"
 
 #include "wx/msw/wx.rc"
-//#include "wx/html/msw/wxhtml.rc"
+
Index: standalone/wxwin/configtooldoc.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/configtooldoc.cpp,v
retrieving revision 1.13
diff -u -5 -r1.13 configtooldoc.cpp
--- standalone/wxwin/configtooldoc.cpp	13 Feb 2003 16:23:38 -0000	1.13
+++ standalone/wxwin/configtooldoc.cpp	19 Mar 2003 17:24:51 -0000
@@ -71,11 +71,11 @@
 #include <windows.h>
 #ifndef __CYGWIN__
 #include <shlobj.h>
 #endif
 #include "wx/msw/winundef.h"
-#if defined(CreateDirectory) && !defined(__CYGWIN__)
+#ifdef CreateDirectory
 #undef CreateDirectory
 #endif
 #endif
 
 #include "configtooldoc.h"
Index: standalone/wxwin/ecpch.h
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/ecpch.h,v
retrieving revision 1.2
diff -u -5 -r1.2 ecpch.h
--- standalone/wxwin/ecpch.h	25 Jan 2003 23:07:53 -0000	1.2
+++ standalone/wxwin/ecpch.h	19 Mar 2003 17:24:51 -0000
@@ -49,13 +49,16 @@
 #ifdef __VISUALC__
 #pragma warning(disable:4786)
 #endif
 
 // include winsock2.h early to eliminate fd_set warning
-#ifdef __CYGWIN__
-#include <winsock2.h>
-#endif
+// FIXME: including winsock2.h early causes build failures
+// relating to the CreateDialog macro defined in the w32api.
+// Need to find a better point to #include <winsock2.h>
+//#ifdef __CYGWIN__
+//#include <winsock2.h>
+//#endif
 
 #include "wx/wx.h"
 #include "wx/splitter.h"
 #include "wx/scrolwin.h"
 #include "wx/imaglist.h"
Index: standalone/wxwin/filename.cpp
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/filename.cpp,v
retrieving revision 1.6
diff -u -5 -r1.6 filename.cpp
--- standalone/wxwin/filename.cpp	3 Feb 2003 15:42:56 -0000	1.6
+++ standalone/wxwin/filename.cpp	19 Mar 2003 17:24:54 -0000
@@ -46,11 +46,10 @@
 
 #include <windows.h>
 #include <shlwapi.h>
 
 #include "wx/msw/winundef.h"
-#ifndef __CYGWIN__
 #ifdef CreateDirectory
 #undef CreateDirectory
 #endif
 #ifdef ExpandEnvironmentStrings
 #undef ExpandEnvironmentStrings
@@ -61,11 +60,10 @@
 #ifdef SetCurrentDirectory
 #undef SetCurrentDirectory
 #endif
 #ifdef GetTempPath
 #undef GetTempPath
-#endif
 #endif
 
 #else
 
 // #include <dir.h>
Index: standalone/wxwin/makefile.gnu
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/wxwin/makefile.gnu,v
retrieving revision 1.6
diff -u -5 -r1.6 makefile.gnu
--- standalone/wxwin/makefile.gnu	18 Mar 2003 17:04:32 -0000	1.6
+++ standalone/wxwin/makefile.gnu	19 Mar 2003 17:25:02 -0000
@@ -25,12 +25,12 @@
   -DecUSE_EXPERIMENTAL_CODE=$(USEEXPERIMENTALCODE)
 EXTRALDFLAGS=-L$(TCLDIR)/lib -L$(INSTALLDIR)/lib -lcdl -lcyginfra -ltcl
 
 ifeq "$(OSTYPE)" "cygwin"
   PROGRAM=configtool.exe
-  CPPFLAGS=-I$(WXDIR)/include -I$(WXDIR)/lib/wx/include -DSTRICT -DWINVER=0x0400 -D_WIN32 -D__GNUWIN32__ -D__WIN95__ -D__WIN32__ -D_X86_=1 -DWIN32
-  LDFLAGS=-L$(WXDIR)/lib -lwx -lstdc++ -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32 -lglu32 -lgdi32 -lcomdlg32 -lole32 -luuid -lshlwapi -lpng -lzlib
+  CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags` -D_WIN32 -D__WIN32__ -DSTRICT
+  LDFLAGS=`$(WXDIR)/bin/wx-config --libs` -lshlwapi
   EXTRAOBJECTS=$(CTBUILDDIR)/configtoolres.o
 else
   PROGRAM=configtool
   CPPFLAGS=`$(WXDIR)/bin/wx-config --cppflags`
   LDFLAGS=`$(WXDIR)/bin/wx-config --libs`
@@ -116,11 +116,11 @@
 
 .cxx.o :
 	$(CC) $(CPPDEBUGOPTIONS) -c $(EXTRACPPFLAGS) $(CPPFLAGS) -o $@ $<
 
 $(CTBUILDDIR)/configtoolres.o: $(CTDIR)/configtool.rc
-	$(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__
+	$(RESCOMP) -i $< -o $@ --preprocessor "$(CC) -c -E -xc-header -DRC_INVOKED" --include-dir $(WXDIR)/include --include-dir $(CTDIR) --define __GNUWIN32__
 
 clean:
 	rm -f $(CTBUILDDIR)/$(PROGRAM) $(CTBUILDDIR)/*.o
 
 ### GUI Configtool files


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]