Re: 64-bit build option?

Vaclav Slavik <[email protected]> Tue, 24 Feb 2009 12:36:02 +0100
Newsgroups gmane.comp.sysutils.bakefile.devel
Message-ID <1235475362.11431.44.camel@localhost>
On Tue, 2009-02-24 at 03:43 -0700, Warren Young wrote:
> Not quite there yet.  All the modules in my library compile, but then I 
> get this for each module in the library:
> 
> > fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

I don't see how does this end up here ("X86" string is nowhere to be
found in related Bakefile code), I'll need some help with this...

> Although the diff output is copious, it's all just repeats of the same 
> basic pattern: "$(PlatformName)\" vs. "$(SolutionDir)"
> 
> When you add the 64-bit build configuration through the GUI, VC++ puts 
> 32-bit debug build outputs in Debug, but 64-bit outputs in x64\Debug. 
> The Bakefile way seems more sensible, giving Win32\Debug and x64\Debug, 
> but maybe there's some limitation in Visual Studio that requires the 
> other arrangement.

I doubt that, I've been using some very weird paths with no problems.
Anyway, this would be harder to change (see _default_builddir
definition).

> Another difficulty I'm running into is that with a hybrid project file, 
> how are you supposed to reference different libraries based on the CPU 
> type? 

Use the pre-defined MSVS_PLATFORM
(http://www.bakefile.org/doc/ch07.html#sec.msvs2005prj.vars) <option> as
you do for any other conditional variables depending on your own
<option>s:

<set var="MYSQL_WIN_DIR">
  <if cond="MSVS_PLATFORM=='win32'">foo</if>
  <if cond="MSVS_PLATFORM=='win64'">bar</if>
</set>

(this only works for msvs200{5,8}prj formats, you have to add checks for
them too).

> Adding this to Bakefiles.bkgen isn't a hardship, but I wonder if it 
> shouldn't be the default, at least during this time of transition.

I don't think so -- it's still not frequently needed (you're the first
one to notice) and it adds extra configurations.

Vaclav

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H

_______________________________________________
Bakefile-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bakefile-devel
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEABECAAYFAkmj26IACgkQxDYa/UZSZMm+TwCfYmRj9JlQ9GKm+fPrL6rixRh2
t0IAn29kATIOT3x25Cq0vAZJnaBjtjoM
=6epu
-----END PGP SIGNATURE-----