   from32bit to 64bit
  Hi everyone!Im getting ready to install windows vista as a developement environement... I m wondering if there is any issues I should be awared of before doing so... and/or some common aproaches to compile my app in 32bit and 64bits!any help would be greatly appreciated![Edited by - golgoth13 on September 7, 2007 5:50:40 PM]
  I don't have any experience of using Vista 64 bit, but I have converted to Linux 64 bit and if you have any programs that use bit-level operations, such as random number generators, you'll have to be careful about the integral types.  I set up a new integral type system, because I use 32 bit Win and 32 bit OSX systems with my 64 bit Linux developent platform and 32 and 64 bit random number generators.  There's also the link here that I've found helpful, if you want to port any code.  This is Linux specific but the same general concepts apply.  You might also consider using a 'typeof' programme to just test your types, something like:// Carries out an analysis of bytes, bits, limits and endianess.  Also// calculates conversion factors for integers to real numbers for uniform// variate conversions, so that the limits of 0 and 1 are never reached,// ie U->(0,1).  Usage:  place as an #include "<path>/Sizes.h" after the// 'int main()' statement; include only once!//#ifndef __SIZES_H#define __SIZES_H// Note..put following in main.cpp before 'main()'// #include <iostream>// #include <iomanip>#include <cstdlib>#include <climits>#include <string>#include "BaseTypes.h"// Checks for 'big-endian' or 'little endian'const base::ints mask=0x12345678;std::string endian="big endian";if (static_cast<base::chars>(mask) == 0x78) endian="little endian";// Base sizes general types...base::charsa_sizeof = 0;base::charub_sizeof = 0;base::ints16c_sizeof = 0;base::ints32d_sizeof = 0;base::ints64e_sizeof = 0;base::intu16f_sizeof = 0;base::intu32g_sizeof = 0;base::intu64h_sizeof = 0;base::real32i_sizeof = 0.0;base::real64j_sizeof = 0.0;base::real80k_sizeof = 0.0;// Conversion factors univeral types...base::real64ints_conv   = 1.0/(std::numeric_limits<base::ints>::max()+1.0);base::real64ints16_conv = 1.0/(std::numeric_limits<base::ints16>::max()+1.0);base::real64ints32_conv = 1.0/(std::numeric_limits<base::ints32>::max()+1.0);base::real64ints64_conv = 1.0/(std::numeric_limits<base::ints64>::max()+1.0);base::real64intu_conv   = 1.0/(std::numeric_limits<base::intu>::max()+1.0);base::real64intu16_conv = 1.0/(std::numeric_limits<base::intu16>::max()+1.0);base::real64intu32_conv = 1.0/(std::numeric_limits<base::intu32>::max()+1.0);base::real64intu64_conv = 1.0/(std::numeric_limits<base::intu64>::max()+1.0);// Write results...std::cout << "\n   ANALYSING TYPES, BYTES, BITS, LIMITS AND ENDIANESS\n";std::cout << "\n";std::cout << "\nUniversal types within the 'base::' namespace are designed to work with"; std::cout << "\nthe LP64 standard (Linux OS and others) and should return the same";std::cout << "\nnumeric limits under either 32k or 64k systems.  Universal types are:\n";std::cout << "\n    base::chars";std::cout << "\n    base::charu";std::cout << "\n    base::ints";std::cout << "\n    base::ints16";std::cout << "\n    base::ints32";std::cout << "\n    base::ints64";std::cout << "\n    base::intu";std::cout << "\n    base::intu16";std::cout << "\n    base::intu32";std::cout << "\n    base::intu64";std::cout << "\n    base::real32";std::cout << "\n    base::real64";std::cout << "\n    base::real80";std::cout << "\n";std::cout << "\nEndianess:  This system is " << endian << ".\n";std::cout << "\nSizes of various 'base::' universal types are:\n";std::cout << "\n   BYTES  BITS";std::cout << "\n   =====  ====";std::cout << "\nbase::chars    " << sizeof(a_sizeof) << "" << sizeof(a_sizeof) * 8;std::cout << "\nbase::charu    " << sizeof(b_sizeof) << "" << sizeof(b_sizeof) * 8;std::cout << "\nbase::ints16   " << sizeof(c_sizeof) << "" << sizeof(c_sizeof) * 8;std::cout << "\nbase::ints32   " << sizeof(d_sizeof) << "" << sizeof(d_sizeof) * 8;std::cout << "\nbase::ints64   " << sizeof(e_sizeof) << "" << sizeof(e_sizeof) * 8;std::cout << "\nbase::intu16   " << sizeof(f_sizeof) << "" << sizeof(f_sizeof) * 8;std::cout << "\nbase::intu32   " << sizeof(g_sizeof) << "" << sizeof(g_sizeof) * 8;std::cout << "\nbase::intu64   " << sizeof(h_sizeof) << "" << sizeof(h_sizeof) * 8;std::cout << "\nbase::real32   " << sizeof(i_sizeof) << "" << sizeof(i_sizeof) * 8;std::cout << "\nbase::real64   " << sizeof(j_sizeof) << "" << sizeof(j_sizeof) * 8;std::cout << "\nbase::real80  " << sizeof(k_sizeof) << "    " << sizeof(k_sizeof) * 8;std::cout << "\n";std::cout << "\nNumeric limits of various 'base::' universal types are:\n";std::cout << "\nbase::intsmin  " << std::numeric_limits<base::ints>::min();std::cout << "\nmax  " << std::numeric_limits<base::ints>::max();std::cout << "\nbase::ints16   min  " << std::numeric_limits<base::ints16>::min();std::cout << "\nmax  " << std::numeric_limits<base::ints16>::max();std::cout << "\nbase::ints32   min  " << std::numeric_limits<base::ints32>::min();std::cout << "\nmax  " << std::numeric_limits<base::ints32>::max();std::cout << "\nbase::ints64   min  " << std::numeric_limits<base::ints64>::min();std::cout << "\nmax  " << std::numeric_limits<base::ints64>::max();std::cout << "\nbase::intumin  " << std::numeric_limits<base::intu>::min();std::cout << "\nmax  " << std::numeric_limits<base::intu>::max();std::cout << "\nbase::intu16   min  " << std::numeric_limits<base::intu16>::min();std::cout << "\nmax  " << std::numeric_limits<base::intu16>::max();std::cout << "\nbase::intu32   min  " << std::numeric_limits<base::intu32>::min();std::cout << "\nmax  " << std::numeric_limits<base::intu32>::max();std::cout << "\nbase::intu64   min  " << std::numeric_limits<base::intu64>::min();std::cout << "\nmax  " << std::numeric_limits<base::intu64>::max();std::cout << "\nbase::real32   min  " << std::numeric_limits<base::real32>::min();std::cout << "\nmax  " << std::numeric_limits<base::real32>::max();std::cout << "\nbase::real64   min  " << std::numeric_limits<base::real64>::min();std::cout << "\nmax  " << std::numeric_limits<base::real64>::max();std::cout << "\nbase::real80   min  " << std::numeric_limits<base::real80>::min();std::cout << "\nmax  " << std::numeric_limits<base::real80>::max();std::cout << "\n";std::cout << "\nConversion factors of various 'base::' universal base types are:\n";std::cout << "\n1.0/(ints+1.0) " << ints_conv   << std::setprecision(60);std::cout << "\n1.0/(ints16+1.0)    " << ints16_conv << std::setprecision(60);std::cout << "\n1.0/(ints32+1.0)    " << ints32_conv << std::setprecision(60);std::cout << "\n1.0/(ints64+1.0)    " << ints64_conv << std::setprecision(60);std::cout << "\n1.0/(intu+1.0) " << intu_conv   << std::setprecision(60);std::cout << "\n1.0/(intu16+1.0)    " << intu16_conv << std::setprecision(60);std::cout << "\n1.0/(intu32+1.0)    " << intu32_conv << std::setprecision(60);std::cout << "\n1.0/(intu64+1.0)    " << intu64_conv << std::setprecision(60);std::cout << "\n" << std::endl;#endifThe above code is very rough but if you cut snippets from it and change the types to yours (the above tests were just for some preliminary analysis, so the types are specific to my system).  Then pop the relevant parts in a main() loop and compile.Vista probably has some sort of 32bit backward compatibility so this may need to be considered.--random   