NO

Author Topic: Updating to 64 bit....  (Read 7356 times)

CommonTater

  • Guest
Updating to 64 bit....
« on: April 10, 2011, 05:40:42 AM »
I just picked up a copy of Windows 7 pro x64 and will be updating my desktop machine in the near future...

Not being entirely expert with 64 bit stuff just yet I have two questions:

1) Is there any advantage to dual booting both 32 and 64 bit versions of win7 (or perhaps triple booting with XP)?

2) Is there a giant sucking "gotcha" out there when I start writing for both x64 and x86 targets?


Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Updating to 64 bit....
« Reply #1 on: April 10, 2011, 02:35:26 PM »
1) Is there any advantage to dual booting both 32 and 64 bit versions of win7 (or perhaps triple booting with XP)?
For testing purposes, if you need a physically installed Windows version, but else you would be fine with virtual systems too.

2) Is there a giant sucking "gotcha" out there when I start writing for both x64 and x86 targets?
I am not aware of a gotcha, since I can usually compile for both architectures without any change to the source code.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #2 on: April 10, 2011, 04:05:50 PM »
For testing purposes, if you need a physically installed Windows version, but else you would be fine with virtual systems too.

That's what I'm wondering about. I have more than one machine to play with and have been using them all for testing but I was thinking that while I have my main machine torn down.... Is there an optimal combination for testing?


Quote
I am not aware of a gotcha, since I can usually compile for both architectures without any change to the source code.

That's good to hear.  But I was more worried about obscure differences in behavior or silly stuff like writing incompatible strings or whatever...  Stuff to watch out for...
« Last Edit: April 10, 2011, 04:16:07 PM by CommonTater »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Updating to 64 bit....
« Reply #3 on: April 10, 2011, 04:57:40 PM »
That's what I'm wondering about. I have more than one machine to play with and have been using them all for testing but I was thinking that while I have my main machine torn down.... Is there an optimal combination for testing?
If your application is not hardware dependent you are doing fine with virtual machines, else I would use some physical ones to test.

Quote
That's good to hear.  But I was more worried about obscure differences in behavior or silly stuff like writing incompatible strings or whatever...  Stuff to watch out for...
Develop for 64-bit, since this is a bit picky, then copy your working code into the 32-bit project and continue testing.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #4 on: April 10, 2011, 07:17:58 PM »
That's what I'm wondering about. I have more than one machine to play with and have been using them all for testing but I was thinking that while I have my main machine torn down.... Is there an optimal combination for testing?
If your application is not hardware dependent you are doing fine with virtual machines, else I would use some physical ones to test.

Most of what I do is not (or at least shouldn't be) hardware or OS version dependent so that's not much of an issue.  Up to now I've just scooted out to the living room or used remote desktop on one of the other machines to test and it's been pretty successful, so far... but it is a bit of a pain when you're doing something and a bug shows up within 3 seconds  ::)

What I was contemplating was perhaps having Win7-x64 and WinXP-x32 as a dual boot but I was wondering if even that is necessary.

(I like simple ... I really really like simple... and the older I get the more I like it.)

Quote
Quote
That's good to hear.  But I was more worried about obscure differences in behavior or silly stuff like writing incompatible strings or whatever...  Stuff to watch out for...
Develop for 64-bit, since this is a bit picky, then copy your working code into the 32-bit project and continue testing.

Thanks for that.... I was wondering which way was best.  

Is it safe to assume that if it works on the 64 bit OS as an x86 target it will work correctly on the x86 OS?  Or am I going to have to test everything both ways?


« Last Edit: April 10, 2011, 07:21:49 PM by CommonTater »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Updating to 64 bit....
« Reply #5 on: April 10, 2011, 08:00:15 PM »
To not have to switch computers the easiest is to setup virtual machines.

From personal experience I recommend the following setup:
  • 64-bit host system
  • a CPU that supports virtualization (Intel VT-X/AMD-V) enabled in the BIOS
  • 8GB RAM or more to allow multiple guests to run concurrently
  • for each virtual system one additional CPU core

For instance a quad-core system with 8GB RAM would allow running 3 virtual machines while you are developing.



If it runs under WOW it should run better under pure x86, since WOW is a bit picky.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #6 on: April 10, 2011, 08:24:18 PM »
To not have to switch computers the easiest is to setup virtual machines.

From personal experience I recommend the following setup:
  • 64-bit host system
  • a CPU that supports virtualization (Intel VT-X/AMD-V) enabled in the BIOS
  • 8GB RAM or more to allow multiple guests to run concurrently
  • for each virtual system one additional CPU core

For instance a quad-core system with 8GB RAM would allow running 3 virtual machines while you are developing.

And oh my gosh do I wish I had the bucks for that...  

This, for me is a hobby.  I do put a fair bit of time into it --in fact it's an excellent passtime-- but there's no way I can justify new computers and big setups within the context.  That's why I was asking about multi-booting...

Quote
 
If it runs under WOW it should run better under pure x86, since WOW is a bit picky.

Ummmm... WOW being the 32bit subsystem?  And yes it's good for me if that's picky.

(FWIW... I really appreciate this... As I told you, I'm on new territory here.... :) )

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Updating to 64 bit....
« Reply #7 on: April 10, 2011, 08:44:32 PM »
And oh my gosh do I wish I had the bucks for that...  

This, for me is a hobby.  I do put a fair bit of time into it --in fact it's an excellent passtime-- but there's no way I can justify new computers and big setups within the context.  That's why I was asking about multi-booting...

Sure you can do multi-boot, but remote desktop is far faster, then shutting one O/S down and booting into another.

I am currently owning a dual-core system with 4GB of RAM and Win7 x64 and am running one additional virtual machine concurrently without problems.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #8 on: April 10, 2011, 09:44:26 PM »
Sure you can do multi-boot, but remote desktop is far faster, then shutting one O/S down and booting into another.

That's what I've been doing... drop it into a hidden share (Test$) then jump over to the other machine on remote desktop and try it out.  (Ticks off my better half because her machine ends up locked .. LOL)

Quote
I am currently owning a dual-core system with 4GB of RAM and Win7 x64 and am running one additional virtual machine concurrently without problems.

Ok... I'll have to look into this a bit more...  Any tutorials or software you can recommend?

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Updating to 64 bit....
« Reply #9 on: April 10, 2011, 10:16:26 PM »
I have been using Microsoft VirtualPC initially, but switched over to Oracle VirtualBox long ago.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #10 on: April 10, 2011, 11:47:38 PM »
I have been using Microsoft VirtualPC initially, but switched over to Oracle VirtualBox long ago.

Thanks, will investigate...

As it turns out, this is hard... I thought I was updating but it would appear I'm on a whole new operating sytem. All my programs, have to be updated, some will end up being abandoned, I need new versions of most everything... Whew...

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #11 on: April 11, 2011, 04:07:58 AM »
Speaking of "Gotchas"...  I've been reading about DLLs on 64 bit Windows.

It seems the 64 bit DLLs are in System32 but the 32 bit ones are in SysWOW64...

Now that I know this, I won't trip on it... but.... What were they thinking???


Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: Updating to 64 bit....
« Reply #12 on: April 11, 2011, 09:23:22 AM »
There is no difference, since the SysWOW64 folder will be redirected to System32 for 32-bit applications, hiding the real System32 folder.

Only 64-bit applications will be able to see both, but System32 will be used for 64-bit applications.

There is a good article about the differences and what you have to take care of at MSDN, but I never had to worry, since things are handled automatically by Windows.

Read the Programming Guide for 64-bit Windows and all its sub-sections, so the confusion should went away.

I would not think too much about there being differences, but start with a simple program and compile it for both architectures.
Now run it and see, if the output is the same for both.
Only check the link above once more for information, if there is something not working as expected.

Start simple and add file system redirection or registry redirection only, if you need it, because you are mixing 32-bit and 64-bit applications.
Keep in mind, that a pure 64-bit environment works the same as a pure 32-bit environment, only mixed environments are resulting in additional code.
I would avoid 64-bit programs accessing 32-bit resources and vice versa, but it can be done if real need is.
« Last Edit: April 11, 2011, 09:25:40 AM by Stefan Pendl »
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #13 on: April 11, 2011, 04:38:49 PM »
Thank you Stephan.  I did look at your link and it was extremely helpful.  I've also compiled and run a couple of my smaller "experiments" for x64 and found it very easy to do.

I do like your advice about developing for x64 then building fo x86 once it's working properly.  I even sorted out how to use the same sourcecode for both projects (that was fun) so I can have modifications in one reflected in the other... very nice!

As I said before ... I just love simple.  I don't forsee much need for interoperability as most of my software is self-contatiained (no DLLs) and the couple of small libraries I do use should recompile without issue anyway.

I really do appreciate the input on this.  
Thank you.


Next task... perminent installation which is never a fun job since I tend to be really picky when doing this.
« Last Edit: April 11, 2011, 04:47:29 PM by CommonTater »

CommonTater

  • Guest
Re: Updating to 64 bit....
« Reply #14 on: April 14, 2011, 06:56:44 AM »
Humph... $350 for a 64 bit OS... practically none of the software I use has 64 bit versions...

Plus none of the addins for the 32 bit POIDE work, so I'm going to have to recompile all of them.
(I sort of expected that.)

Other than a couple of minor grumbles... so far so good...