MingW32 compilation fixes all over

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 1999-07-20 14:14:46 +00:00
parent 1ecffbff71
commit 2662e49e09
12 changed files with 189 additions and 109 deletions

View File

@ -5,8 +5,43 @@
I) Windows using plain makefiles
----------------------------------------
No idea, never did it.
a) Using the GNU MingW32 or GNU Cygwin32 compilers
You'll need the compiler itself which is available from
http://www.cygwin.com
When using MingW32 you'll need a few of the tools that
are either shipped separately or only as part of the
Cygwin32 toolchain. First and foremost, you'll need
make.exe
byacc.exe
make.exe is also available from
http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32
-> Set your path so that it includes the directory
where your compiler and tools reside
-> Assume that you installed the wxWindows sources
into c:\wxWin
-> Copy c:\wxWin\include\wx\msw\setup0.h
to c:\wxWin\include\wx\msw\setup.h
-> Edit c:\wxWin\include\wx\msw\setup.h so that
most features are enabled (i.e. defined to 1) with
#define wxUSE_SOCKETS 1
#define wxUSE_HTML 1
#define wxUSE_THREADS 1
#define wxUSE_FS_INET 1
#define wxUSE_FS_ZIP 1
#define wxUSE_BUSYINFO 1
#define wxUSE_DYNLIB_CLASS 1
#define wxUSE_ZIPSTREAM 1
and disbale iostreams with
#define wxUSE_STD_IOSTREAM 0
-> type: cd c:\wxWin\src\msw
-> type: make -f makefile.g95
II) Unix using plain makefiles.
----------------------------------------

View File

@ -16,29 +16,31 @@
foreach $file (sort keys %wxGeneric) {
#! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
#! so take the generic version
if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
if ( $wxGeneric{$file} =~ /\b(PS|G|U|16)\b/ ) {
next unless $file =~ /^dirdlgg\./;
}
$file =~ s/cp?p?$/\$(OBJSUFF)/;
$project{"WXGENERICOBJS"} .= '$(GENDIR)\\' . $file . " "
$project{"WXGENERICOBJS"} .= '$(GENDIR)/' . $file . " "
}
foreach $file (sort keys %wxCommon) {
#! socket files don't compile under Win16 currently
next if $wxCommon{$file} =~ /\b(32|S)\b/;
next if $wxCommon{$file} =~ /\b(16)\b/;
#! needs extra files (sql*.h) so not compiled by default.
next if $file =~ /^odbc\./;
$file =~ s/cp?p?$/\$(OBJSUFF)/;
$project{"WXCOMMONOBJS"} .= '$(COMMDIR)\\' . $file . " "
$project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " "
}
foreach $file (sort keys %wxMSW) {
#! Mingw32 doesn't have the OLE headers and has some troubles with
#! socket code
next if $wxMSW{$file} =~ /\b(O|S|16)\b/;
next if $wxMSW{$file} =~ /\b(O|16)\b/;
#! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations,
next if $file =~ /^dirdlg\./;
$file =~ s/cp?p?$/\$(OBJSUFF)/;
$project{"WXMSWOBJS"} .= $file . " "
@ -181,7 +183,11 @@ clean_rcp:
cd $(WXDIR)/src/msw
clean:
rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core
erase *.o
erase ../common/y_tab.c
erase ../common/lex_yy.c
erase $(WXDIR)/lib/libwx$(GUISUFFIX).a
erase core
cleanall: clean

View File

@ -16,6 +16,9 @@
#pragma interface "dc.h"
#endif
#include "wx/defs.h"
#include "wx/dc.h"
// ---------------------------------------------------------------------------
// macros
// ---------------------------------------------------------------------------

View File

@ -39,8 +39,8 @@ MAKE=make
LEX=flex # -t -L
# YACC. yacc or bison
# YACC=yacc
YACC=bison
YACC=byacc
#YACC=bison
# Settings for Cyginw/Mingw32
RESCOMP=windres.exe

View File

@ -30,9 +30,9 @@
#endif
#endif
#include "wx/wxchar.h"
#include "wx/msw/curicop.h"
#include "wx/msw/curico.h"
#include "wx/wxchar.h"
#include "wx/string.h"
//*****************************************************************************

View File

@ -21,9 +21,9 @@
#endif
#ifndef WX_PRECOMP
#include <stdio.h>
#include "wx/setup.h"
#include "wx/defs.h"
#include "wx/string.h"
#endif
#include <windows.h>
@ -50,10 +50,31 @@
#define BFT_BITMAP 0x4d42 /* 'BM' */
#define BFT_CURSOR 0x5450 /* 'PT' */
#ifndef SEEK_CUR
/* flags for _lseek */
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
#endif
/* Copied from PNGhandler for coompilation with MingW32, RR */
#ifndef GlobalAllocPtr
#define GlobalPtrHandle(lp) \
((HGLOBAL)GlobalHandle(lp))
#define GlobalLockPtr(lp) \
((BOOL)GlobalLock(GlobalPtrHandle(lp)))
#define GlobalUnlockPtr(lp) \
GlobalUnlock(GlobalPtrHandle(lp))
#define GlobalAllocPtr(flags, cb) \
(GlobalLock(GlobalAlloc((flags), (cb))))
#define GlobalReAllocPtr(lp, cbNew, flags) \
(GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags))))
#define GlobalFreePtr(lp) \
(GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp)))
#endif
/*
@ -145,7 +166,7 @@ int DibWriteFile(LPTSTR szFile, LPBITMAPINFOHEADER lpbi)
bmf.bfSize = sizeof(bmf) + size;
bmf.bfReserved1 = 0;
bmf.bfReserved2 = 0;
bmf.bfOffBits = sizeof(bmf) + (char far*)(DibPtr(lpbi)) - (char far*)lpbi;
bmf.bfOffBits = sizeof(bmf) + (char FAR*)(DibPtr(lpbi)) - (char FAR*)lpbi;
#if defined( __WATCOMC__) || defined(__VISUALC__) || defined(__SC__) || defined(__SALFORDC__) || defined(__MWERKS__)
if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 ||
_hwrite(fh, (LPCSTR)lpbi, size)<0) {
@ -686,7 +707,7 @@ BOOL DibMapToPalette(PDIB pdib, HPALETTE hpal)
HPALETTE MakePalette(const BITMAPINFO FAR* Info, UINT flags)
{
HPALETTE hPalette;
const RGBQUAD far* rgb = Info->bmiColors;
const RGBQUAD FAR* rgb = Info->bmiColors;
WORD nColors = Info->bmiHeader.biClrUsed;
if (nColors) {

View File

@ -27,6 +27,9 @@
#include "wx/setup.h"
#include "wx/window.h"
#include "wx/dcclient.h"
#include "wx/dcscreen.h"
#include "wx/dcmemory.h"
#include "wx/settings.h"
#endif
#include "wx/log.h"

View File

@ -28,6 +28,7 @@
#include "wx/dialog.h"
#include "wx/filedlg.h"
#include "wx/intl.h"
#include "wx/log.h"
#endif
#include <windows.h>

View File

@ -29,6 +29,7 @@
#include "wx/brush.h"
#include "wx/font.h"
#include "wx/dc.h"
#include "wx/utils.h"
#endif
#include <windowsx.h>

View File

@ -1,8 +1,6 @@
# This file was automatically generated by tmake at 21:00, 1999/07/14
# This file was automatically generated by tmake at 15:25, 1999/07/20
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
#
@ -60,94 +58,103 @@ MSWDIR=.
DOCDIR = $(WXDIR)\docs
GENERICOBJS= $(GENDIR)\busyinfo.$(OBJSUFF) \
$(GENDIR)\choicdgg.$(OBJSUFF) \
$(GENDIR)\dirdlgg.$(OBJSUFF) \
$(GENDIR)\extdlgg.$(OBJSUFF) \
$(GENDIR)\gridg.$(OBJSUFF) \
$(GENDIR)\imaglist.$(OBJSUFF) \
$(GENDIR)\laywin.$(OBJSUFF) \
$(GENDIR)\listctrl.$(OBJSUFF) \
$(GENDIR)\notebook.$(OBJSUFF) \
$(GENDIR)\panelg.$(OBJSUFF) \
$(GENDIR)\progdlgg.$(OBJSUFF) \
$(GENDIR)\prop.$(OBJSUFF) \
$(GENDIR)\propform.$(OBJSUFF) \
$(GENDIR)\proplist.$(OBJSUFF) \
$(GENDIR)\sashwin.$(OBJSUFF) \
$(GENDIR)\scrolwin.$(OBJSUFF) \
$(GENDIR)\splitter.$(OBJSUFF) \
$(GENDIR)\statusbr.$(OBJSUFF) \
$(GENDIR)\tabg.$(OBJSUFF) \
$(GENDIR)\textdlgg.$(OBJSUFF) \
$(GENDIR)\tipdlg.$(OBJSUFF) \
$(GENDIR)\treectrl.$(OBJSUFF)
GENERICOBJS= $(GENDIR)/busyinfo.$(OBJSUFF) \
$(GENDIR)/choicdgg.$(OBJSUFF) \
$(GENDIR)/dirdlgg.$(OBJSUFF) \
$(GENDIR)/extdlgg.$(OBJSUFF) \
$(GENDIR)/gridg.$(OBJSUFF) \
$(GENDIR)/laywin.$(OBJSUFF) \
$(GENDIR)/panelg.$(OBJSUFF) \
$(GENDIR)/progdlgg.$(OBJSUFF) \
$(GENDIR)/prop.$(OBJSUFF) \
$(GENDIR)/propform.$(OBJSUFF) \
$(GENDIR)/proplist.$(OBJSUFF) \
$(GENDIR)/sashwin.$(OBJSUFF) \
$(GENDIR)/scrolwin.$(OBJSUFF) \
$(GENDIR)/splitter.$(OBJSUFF) \
$(GENDIR)/statusbr.$(OBJSUFF) \
$(GENDIR)/tabg.$(OBJSUFF) \
$(GENDIR)/textdlgg.$(OBJSUFF) \
$(GENDIR)/tipdlg.$(OBJSUFF)
COMMONOBJS = \
$(COMMDIR)/y_tab.$(OBJSUFF) \
$(COMMDIR)/cmndata.$(OBJSUFF) \
$(COMMDIR)/config.$(OBJSUFF) \
$(COMMDIR)/date.$(OBJSUFF) \
$(COMMDIR)/datstrm.$(OBJSUFF) \
$(COMMDIR)/db.$(OBJSUFF) \
$(COMMDIR)/dbtable.$(OBJSUFF) \
$(COMMDIR)/dcbase.$(OBJSUFF) \
$(COMMDIR)/dlgcmn.$(OBJSUFF) \
$(COMMDIR)/docmdi.$(OBJSUFF) \
$(COMMDIR)/docview.$(OBJSUFF) \
$(COMMDIR)/dynarray.$(OBJSUFF) \
$(COMMDIR)/dynlib.$(OBJSUFF) \
$(COMMDIR)/event.$(OBJSUFF) \
$(COMMDIR)/extended.$(OBJSUFF) \
$(COMMDIR)\cmndata.$(OBJSUFF) \
$(COMMDIR)\config.$(OBJSUFF) \
$(COMMDIR)\date.$(OBJSUFF) \
$(COMMDIR)\datstrm.$(OBJSUFF) \
$(COMMDIR)\db.$(OBJSUFF) \
$(COMMDIR)\dbtable.$(OBJSUFF) \
$(COMMDIR)\dcbase.$(OBJSUFF) \
$(COMMDIR)\dlgcmn.$(OBJSUFF) \
$(COMMDIR)\docmdi.$(OBJSUFF) \
$(COMMDIR)\docview.$(OBJSUFF) \
$(COMMDIR)\dynarray.$(OBJSUFF) \
$(COMMDIR)\dynlib.$(OBJSUFF) \
$(COMMDIR)\event.$(OBJSUFF) \
$(COMMDIR)\file.$(OBJSUFF) \
$(COMMDIR)\fileconf.$(OBJSUFF) \
$(COMMDIR)\filefn.$(OBJSUFF) \
$(COMMDIR)\filesys.$(OBJSUFF) \
$(COMMDIR)\framecmn.$(OBJSUFF) \
$(COMMDIR)\fs_inet.$(OBJSUFF) \
$(COMMDIR)\fs_zip.$(OBJSUFF) \
$(COMMDIR)\gdicmn.$(OBJSUFF) \
$(COMMDIR)\hash.$(OBJSUFF) \
$(COMMDIR)\helpbase.$(OBJSUFF) \
$(COMMDIR)\imagbmp.$(OBJSUFF) \
$(COMMDIR)\image.$(OBJSUFF) \
$(COMMDIR)\imaggif.$(OBJSUFF) \
$(COMMDIR)\imagjpeg.$(OBJSUFF) \
$(COMMDIR)\imagpng.$(OBJSUFF) \
$(COMMDIR)\intl.$(OBJSUFF) \
$(COMMDIR)\ipcbase.$(OBJSUFF) \
$(COMMDIR)\layout.$(OBJSUFF) \
$(COMMDIR)\list.$(OBJSUFF) \
$(COMMDIR)\log.$(OBJSUFF) \
$(COMMDIR)\memory.$(OBJSUFF) \
$(COMMDIR)\module.$(OBJSUFF) \
$(COMMDIR)\mstream.$(OBJSUFF) \
$(COMMDIR)\object.$(OBJSUFF) \
$(COMMDIR)\objstrm.$(OBJSUFF) \
$(COMMDIR)\paper.$(OBJSUFF) \
$(COMMDIR)\prntbase.$(OBJSUFF) \
$(COMMDIR)\resource.$(OBJSUFF) \
$(COMMDIR)\stream.$(OBJSUFF) \
$(COMMDIR)\string.$(OBJSUFF) \
$(COMMDIR)\tbarbase.$(OBJSUFF) \
$(COMMDIR)\tbarsmpl.$(OBJSUFF) \
$(COMMDIR)\textfile.$(OBJSUFF) \
$(COMMDIR)\time.$(OBJSUFF) \
$(COMMDIR)\timercmn.$(OBJSUFF) \
$(COMMDIR)\tokenzr.$(OBJSUFF) \
$(COMMDIR)\txtstrm.$(OBJSUFF) \
$(COMMDIR)\unzip.$(OBJSUFF) \
$(COMMDIR)\utilscmn.$(OBJSUFF) \
$(COMMDIR)\valgen.$(OBJSUFF) \
$(COMMDIR)\validate.$(OBJSUFF) \
$(COMMDIR)\valtext.$(OBJSUFF) \
$(COMMDIR)\variant.$(OBJSUFF) \
$(COMMDIR)\wfstream.$(OBJSUFF) \
$(COMMDIR)\wincmn.$(OBJSUFF) \
$(COMMDIR)\wxchar.$(OBJSUFF) \
$(COMMDIR)\wxexpr.$(OBJSUFF) \
$(COMMDIR)\zipstream.$(OBJSUFF) \
$(COMMDIR)\zstream.$(OBJSUFF)
$(COMMDIR)/ffile.$(OBJSUFF) \
$(COMMDIR)/file.$(OBJSUFF) \
$(COMMDIR)/fileconf.$(OBJSUFF) \
$(COMMDIR)/filefn.$(OBJSUFF) \
$(COMMDIR)/filesys.$(OBJSUFF) \
$(COMMDIR)/framecmn.$(OBJSUFF) \
$(COMMDIR)/fs_inet.$(OBJSUFF) \
$(COMMDIR)/fs_zip.$(OBJSUFF) \
$(COMMDIR)/ftp.$(OBJSUFF) \
$(COMMDIR)/gdicmn.$(OBJSUFF) \
$(COMMDIR)/hash.$(OBJSUFF) \
$(COMMDIR)/helpbase.$(OBJSUFF) \
$(COMMDIR)/http.$(OBJSUFF) \
$(COMMDIR)/imagbmp.$(OBJSUFF) \
$(COMMDIR)/image.$(OBJSUFF) \
$(COMMDIR)/imaggif.$(OBJSUFF) \
$(COMMDIR)/imagjpeg.$(OBJSUFF) \
$(COMMDIR)/imagpng.$(OBJSUFF) \
$(COMMDIR)/intl.$(OBJSUFF) \
$(COMMDIR)/ipcbase.$(OBJSUFF) \
$(COMMDIR)/layout.$(OBJSUFF) \
$(COMMDIR)/list.$(OBJSUFF) \
$(COMMDIR)/log.$(OBJSUFF) \
$(COMMDIR)/memory.$(OBJSUFF) \
$(COMMDIR)/mimetype.$(OBJSUFF) \
$(COMMDIR)/module.$(OBJSUFF) \
$(COMMDIR)/mstream.$(OBJSUFF) \
$(COMMDIR)/object.$(OBJSUFF) \
$(COMMDIR)/objstrm.$(OBJSUFF) \
$(COMMDIR)/paper.$(OBJSUFF) \
$(COMMDIR)/prntbase.$(OBJSUFF) \
$(COMMDIR)/process.$(OBJSUFF) \
$(COMMDIR)/protocol.$(OBJSUFF) \
$(COMMDIR)/resource.$(OBJSUFF) \
$(COMMDIR)/sckaddr.$(OBJSUFF) \
$(COMMDIR)/sckfile.$(OBJSUFF) \
$(COMMDIR)/sckint.$(OBJSUFF) \
$(COMMDIR)/sckipc.$(OBJSUFF) \
$(COMMDIR)/sckstrm.$(OBJSUFF) \
$(COMMDIR)/socket.$(OBJSUFF) \
$(COMMDIR)/stream.$(OBJSUFF) \
$(COMMDIR)/string.$(OBJSUFF) \
$(COMMDIR)/tbarbase.$(OBJSUFF) \
$(COMMDIR)/textcmn.$(OBJSUFF) \
$(COMMDIR)/textfile.$(OBJSUFF) \
$(COMMDIR)/time.$(OBJSUFF) \
$(COMMDIR)/timercmn.$(OBJSUFF) \
$(COMMDIR)/tokenzr.$(OBJSUFF) \
$(COMMDIR)/txtstrm.$(OBJSUFF) \
$(COMMDIR)/unzip.$(OBJSUFF) \
$(COMMDIR)/url.$(OBJSUFF) \
$(COMMDIR)/utilscmn.$(OBJSUFF) \
$(COMMDIR)/valgen.$(OBJSUFF) \
$(COMMDIR)/validate.$(OBJSUFF) \
$(COMMDIR)/valtext.$(OBJSUFF) \
$(COMMDIR)/variant.$(OBJSUFF) \
$(COMMDIR)/wfstream.$(OBJSUFF) \
$(COMMDIR)/wincmn.$(OBJSUFF) \
$(COMMDIR)/wxchar.$(OBJSUFF) \
$(COMMDIR)/wxexpr.$(OBJSUFF) \
$(COMMDIR)/zipstream.$(OBJSUFF) \
$(COMMDIR)/zstream.$(OBJSUFF)
MSWOBJS = accel.$(OBJSUFF) \
app.$(OBJSUFF) \
@ -176,14 +183,12 @@ MSWOBJS = accel.$(OBJSUFF) \
dialog.$(OBJSUFF) \
dib.$(OBJSUFF) \
dibutils.$(OBJSUFF) \
dirdlg.$(OBJSUFF) \
dragimag.$(OBJSUFF) \
filedlg.$(OBJSUFF) \
font.$(OBJSUFF) \
fontdlg.$(OBJSUFF) \
frame.$(OBJSUFF) \
gauge95.$(OBJSUFF) \
gaugemsw.$(OBJSUFF) \
gdiobj.$(OBJSUFF) \
helpwin.$(OBJSUFF) \
icon.$(OBJSUFF) \
@ -225,7 +230,6 @@ MSWOBJS = accel.$(OBJSUFF) \
tabctrl.$(OBJSUFF) \
taskbar.$(OBJSUFF) \
tbar95.$(OBJSUFF) \
tbarmsw.$(OBJSUFF) \
textctrl.$(OBJSUFF) \
thread.$(OBJSUFF) \
timer.$(OBJSUFF) \
@ -307,7 +311,11 @@ clean_rcp:
cd $(WXDIR)/src/msw
clean:
rm -f $(OBJECTS) $(EXTRAOBJS) ../common/y_tab.c ../common/lex_yy.c $(WXDIR)/lib/libwx$(GUISUFFIX).a core
erase *.o
erase ../common/y_tab.c
erase ../common/lex_yy.c
erase $(WXDIR)/lib/libwx$(GUISUFFIX).a
erase core
cleanall: clean

View File

@ -32,10 +32,11 @@
#endif
#include <windows.h>
#include <wx/palette.h>
#include <wx/bitmap.h>
#include <wx/msw/pngread.h>
#include <wx/msw/dibutils.h>
#include "wx/palette.h"
#include "wx/bitmap.h"
#include "wx/utils.h"
#include "wx/msw/pngread.h"
#include "wx/msw/dibutils.h"
extern "C" {
#include "../png/png.h"

View File

@ -32,6 +32,7 @@
#if wxUSE_STATLINE
#include "wx/msw/private.h"
#include "wx/log.h"
// ============================================================================
// implementation