Wireshark-dev: Re: [Wireshark-dev] Building plugins for both win32 & win64
From: "Graham Bloice" <graham.bloice@xxxxxxxxxxxxx>
Date: Thu, 19 Jan 2012 17:39:56 -0000

> -----Original Message-----
> From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-
> bounces@xxxxxxxxxxxxx] On Behalf Of Teto
> Sent: 19 January 2012 17:17
> To: Developer support list for Wireshark
> Subject: Re: [Wireshark-dev] Building plugins for both win32 & win64
> 
> I am very eager to know the answer since I am currently fighting to build
> both.
> I don't know how I did it but in fact, I 've got 2 folders:
> -wireshark-win32-lib
> -wireshark-win64-lib
> 
> I think I have built correctly all libs in the 2 directories, but whenever I try

There's not much building, mostly downloading.  It is best to keep them separate though.

> compiling wireshark in 32 bits (set
> WIRESHARK_TARGET_PLATFORM=win32 within a x86 visual command
> prompt), I've got this error:
> 
> "inffas32.obj : fatal error LNK1112: module machine type 'X86'
> conflicts with target machine type 'x64'"
> 

Have you done a 'nmake -f Makefile.nmake clean' when switching between build types?  Check after this that there are no object files left lying around 'dir /s *.obj' and delete them if there are.  As the builds are done in-tree if you don't clean all the previous types object files out they will cause issues with the build of the current type.

> I've got no pb compiling into 64bits. (I call vcvars64bits,set
> WIRESHARK_TARGET_PLATFORM=win64).
> 
> any help/doc on this could be useful.
> 
> On Sat, Jan 14, 2012 at 5:45 PM, Weir, Alan <AWeir@xxxxxxxxxxxxx> wrote:
> > Am I correct in saying that in order to build a plugin for both win32
> > and
> > win64 that I have to install the source twice and build each version.
> > Then copy my plugin into each source tree and build the two executables.
> >
> >
> >
> > If so, then, with the recent discussions regarding moving to
> > powershell and or msbuild would it be possible to direct the built
> > files into target specific subfolders (i.e win32 and win64) in the
> > same way that Visual Studio does. In that way the source only needs to
> > be installed once and the two targets can be built side be side.
> >
> >
> >
> > Alan
> >
> >
> >