New tech note, corrected makeprog.b32
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
TN0001 How to add a new sample
|
||||
TN0002 wxWindows translator guide
|
||||
TN0003 Adding wxWindows class documentation
|
||||
TN0004 Compiling a sample in the C++Builder 1.0 IDE
|
||||
|
||||
Version: $Id$
|
||||
|
114
docs/tech/tn0004.txt
Normal file
114
docs/tech/tn0004.txt
Normal file
@@ -0,0 +1,114 @@
|
||||
Date: Tue, 11 Apr 2000 20:25:20 +0100 (BST)
|
||||
From: Chris Elliott <cje2@biolpc22.york.ac.uk>
|
||||
To: wxDevelopers <wx-devel@wxwindows.org>
|
||||
Subject: [wx-dev] [wxdev] wxWin BCB compile in IDE 2.1.15
|
||||
|
||||
I have compiled the MDI sample in the Borland C++Builder 1.0 IDE.
|
||||
|
||||
To do this you need to add a bit to the top of the mdi.cpp file like this
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
#include <condefs.h>
|
||||
USERC("mdi.rc");
|
||||
#endif // defined(__BORLANDC__)
|
||||
|
||||
though it might be better to define another variable
|
||||
|
||||
The .mak file looks like this;
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
VERSION = BCB.01
|
||||
#-----------------------------------------------------------------------------
|
||||
!ifndef BCB
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
PROJECT = mdi.exe
|
||||
OBJFILES = mdi.obj
|
||||
RESFILES = mdi.res
|
||||
RESDEPEN = $(RESFILES)
|
||||
LIBFILES =
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
CFLAG1 = -O2 -w- -k -r -v -vi -c -WM -R
|
||||
CFLAG2 = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32 \
|
||||
|
||||
-Id:\wx\samples\include\wx\msw;$(BCB)\include;$(BCB)\include\vcl;d:\wx\include;.\MDI
|
||||
\
|
||||
-H=BC32.CSM -n.\MDI
|
||||
PFLAGS = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32 \
|
||||
|
||||
-Ud:\wx\samples\include\wx\msw;.\mdi;$(BCB)\lib;$(BCB)\lib\obj;d:\wx\lib \
|
||||
|
||||
-Id:\wx\samples\include\wx\msw;$(BCB)\include;$(BCB)\include\vcl;d:\wx\include;.\MDI
|
||||
\
|
||||
-v -jph -m
|
||||
RFLAGS = -DINC_OLE2;__WIN95__;__WXMSW__;__WINDOWS__;WIN32 \
|
||||
|
||||
-id:\wx\samples\include\wx\msw;$(BCB)\include;$(BCB)\include\vcl;d:\wx\include;.\MDI
|
||||
\
|
||||
-I$(BCB)\include;$(BCB)\include\vcl;;.\MDI
|
||||
LFLAGS =
|
||||
-Ld:\wx\samples\include\wx\msw;.\mdi;$(BCB)\lib;$(BCB)\lib\obj;d:\wx\lib \
|
||||
-aa -Tpe -v -V4.0 -c
|
||||
IFLAGS =
|
||||
LINKER = ilink32
|
||||
#-----------------------------------------------------------------------------
|
||||
ALLOBJ = c0w32.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) vcl.lib xpm.lib wx32.lib ole2w32.lib import32.lib \
|
||||
cp32mt.lib
|
||||
#
|
||||
---------------------------------------------------------------------------
|
||||
.autodepend
|
||||
|
||||
$(PROJECT): $(OBJFILES) $(RESDEPEN)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB),, +
|
||||
$(ALLRES)
|
||||
!
|
||||
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\dcc32 $(PFLAGS) { $** }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $*
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $**
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\brcc32 $(RFLAGS) $<
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
I can't persuade it to accept $(WXDIR) in place of d:\wx for some reason.
|
||||
Parts of the file are automatically regenerated by the BCB system, so it
|
||||
always adds unncessary vcl libaraies !!
|
||||
|
||||
The USERC macro is used by the ide to automatically manage the RC file and
|
||||
in a VCL poject would be used to control the several units. In case you
|
||||
are wondering, the relevant macro is expanded in condefs.h
|
||||
|
||||
#define USERC(FileName) \
|
||||
extern DummyThatIsNeverReferenced
|
||||
|
||||
If you have more thann one cpp unit, you can use a part of the code like
|
||||
this
|
||||
|
||||
#define USEUNIT(ModName) \
|
||||
extern DummyThatIsNeverReferenced
|
||||
#define USERES(ModName) \
|
||||
extern DummyThatIsNeverReferenced
|
||||
|
||||
USEUNIT("child.cpp");
|
||||
USERES("mdi.RES");
|
||||
|
||||
|
||||
chris
|
||||
|
@@ -30,7 +30,7 @@ OPT = -Od
|
||||
DEBUG_FLAGS =
|
||||
!endif
|
||||
|
||||
CPPFLAGS=$(CPP_FLAGS) $(DEBUG_FLAGS) $(OPT)
|
||||
CPPFLAGS=$(CPP_FLAGS) $(DEBUG_FLAGS) $(OPT) @$(CFG)
|
||||
|
||||
all: $(TARGET).exe $(EXTRATARGETS)
|
||||
|
||||
|
Reference in New Issue
Block a user