--- In anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com, YAP <x112358
...> wrote:
>
> Excellent! Thanks! Have never thought about myself.....
>
> Cheers
> /Ake
>
> On 5/31/07, ddotedotsdot <dsilvia
...> wrote:
> >
> > --- In
anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com<anthemion-devtools%40yahoogroups.com>,
> > YAP <x112358
> wrote:
> > >
> > > Thanks Dave for all the work you spent on this (appreciated).
> > >
> > > I work in the way you describe today. For this project I use Visual
> > C++ for
> > > WIN32 and GCC for Unix.
> > >
> > > As this is a quite a large project there is many ifdefs for platform
> > > dependent things but for some functionality the implementions are so
> > > different that the code is in a seperate h/cpp file pairs for each
> > > platform. Yes I know it would have been possible to put them in the
> > same
> > > files and use ifdefs but separate them make the code easier to
> > maintain and
> > > look nice.
> > >
> > > So to be clear
> > >
> > > - On Unix I need to compile files a.cpp, b.cpp, d.cpp amd x.cpp to
> > form the
> > > executable aaaa
> > > - On Windows I need to compile files a.cpp, b.cpp, d.cpp amd y.cpp
> > form the
> > > executable aaaa.exe
> > >
> > > Cheers
> > > /Ake
> > >
> > > On 5/31/07, Dave Silvia <dsilvia
> wrote:
> > > >
> > > > > -- On Wed, 30 May 2007 22:39:29 +0200 YAP wrote -- I have a
> > project
> > > > > which is built for Windows and Unix. For some parts of this
project
> > > > > different files is used for each environment. How is this best
> > > > > handled in DialogBlocks?
> > > > >
> > > > > One obvious way to solve this is to create two projects. One for
> > > > > Unix and one for Windows which overlaps. A better way in my
opinion
> > > > > was if the source section could have some environment under
> > > > > sections also which was hooked to the "configurations" settings.
> > > > >
> > > > > This is still my # 1 favorite tool!
> > > > >
> > > > > Cheers /Ake
> > > > >
> > > >
> > > > Hi!
> > > >
> > > > I'm only guessing, since you don't mention platform specifics,
> > > > compilers, or DB/wxWidgets versions, that you're using the current
> > > > DB/wxWidgets and the same compiler on both platforms? (else,
there is
> > > > no conflict!;)
> > > >
> > > > >> A better way in my opinion was if the source section could have
> > > > >> some environment under sections also which was hooked to the
> > > > >> "configurations" settings.
> > > >
> > > > Just for grins, let's say you're using GCC on both platforms.
You can
> > > > keep platform specific details separate by using the Add button in
> > > > Build>Configurations>Compiler Configurations:
> > > >
> > > >
> > > >
> > > > You then get:
> > > >
> > > >
> > > >
> > > > Check the box Debug version, insert Unix in front of GCC
Debug, and
> > > > click OK.
> > > >
> > > > Select Add again, and this time:
> > > >
> > > >
> > > >
> > > > only insert Unix in front of GCC Release and click OK.
> > > >
> > > > Then do similarly for Windows, inserting Windows in front of GCC
> > > > Debug/Release.
> > > >
> > > > There should be no conflicts then, as DB will generate appropriate
> > > > makefiles on each platform. If the includes you need are in
addition
> > > > to platform headers (I assume they are, by implication from your
> > > > post), the Include path would be set to:
> > > >
> > > >
> > > >
> > > > for Unix and:
> > > >
> > > >
> > > >
> > > > for Windows.
> > > >
> > > > If the specific files are what you're changing from one
platform to
> > > > another, the standard method is to #ifdef ... #else ... #endif
around
> > > > the include files in the code, i.e.:
> > > >
> > > > #ifdef MyWindows
> > > > #include "myWindows.h"
> > > > #else
> > > > #include "myUnix.h"
> > > > #endif
> > > >
> > > > and have DB define MyWindows for Windows GCC Debug/Release:
> > > >
> > > >
> > > >
> > > > with -DMyWindows in the Debug flags.
> > > >
> > > > Lastly, you'd want to have separate makefiles, so:
> > > >
> > > >
> > > >
> > > > and:
> > > >
> > > >
> > > >
> > > > In this way, you have only one project for multiple builds.
> > > >
> > > > I'm attaching a .pjd for reference.
> > > >
> > > > HTH:
> > > >
> > > > thx, Dave S.
> > > ---
> > > Ake Hedman (YAP - Yet Another Programmer)
> >
> > > - On Unix I need to compile files a.cpp, b.cpp, d.cpp amd x.cpp to
> > form the
> > > executable aaaa
> > > - On Windows I need to compile files a.cpp, b.cpp, d.cpp amd y.cpp
> > form the
> > > executable aaaa.exe
> >
> > Hi!
> >
> > Hmm...
> >
> > Is there a way you can put these files into an include file, i.e.:
> >
> > platformSrcs.h
> >
> > #ifdef MyWindows
> > #include "myWindowsa.cpp"
> > #include "myWindowsb.cpp"
> > #include "myWindowsd.cpp"
> > #include "myWindowsy.cpp"
> > #else
> > #include "myUnixa.cpp"
> > #include "myUnixb.cpp"
> > #include "myUnixd.cpp"
> > #include "myUnixx.cpp"
> > #endif
> >
> > or if they need separate files, just put each in a file with the
> > #ifdef... #else ... #endif.
> >
> > platformA.h
> > #ifdef MyWindows
> > #include "myWindowsa.