Thread: 32 and 64

  1. #1
    Registered User
    Join Date
    May 2005
    Location
    Texas
    Posts
    103

    32 and 64

    Hello, when trying to pass some of my programs to my friends, they wouldn't work, so I found out that his computer was a 64-Bit, instead of a 32-Bit, like most of the normal computers. How can we make a program that can work both on 32-Bit and 64-Bit Computers??
    Be easy on me...only 14

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    Have you tried recompiling on the 64 bit system?
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  3. #3
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    a 64 bit system should have a 32 bit subsystem. It should run 32 bit stuff just fine. There's probably another factor that caused your program not to work.

    edit:
    wait, are we not talking about windows?
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    903
    Explain : "wouldn't work". What happens ?

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    My computer has a 64-bit processor but I run mostly 32-bit programs and Windows XP which is also 32-bit. Its not the computer's processor that determines whether a program is 32-bit or 64-bit but how the program is compiled. Just compile for 32-bit and the program will run on both 32 and 64 bit machines (although it won't take advantage of the 64-bit assembly instruction set).

  6. #6
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    I agree with AD and FYB. I run Windows XP Pro x64 at work and 90% of my apps are x86. It should work. There is a problem with your app, and it is not that it was compiled on/for x86.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    It's probably that it's compiled in debug mode, and the target system doesn't have the debug DLLs.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Registered User
    Join Date
    May 2005
    Location
    Texas
    Posts
    103
    oh yes probably that's it, so I compile it on Release??
    Be easy on me...only 14

  9. #9
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    It's worth a try.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  10. #10
    Registered User
    Join Date
    May 2002
    Posts
    66
    What OS did you use to compile and what OS is your friend running?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File IO
    By Jack1982 in forum C++ Programming
    Replies: 9
    Last Post: 10-15-2007, 01:14 AM
  2. Error with a vector
    By Tropicalia in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2006, 07:45 PM
  3. creating an array of rects
    By a1dutch in forum C++ Programming
    Replies: 8
    Last Post: 03-07-2006, 06:15 PM
  4. porting application from 32 bit to 64 bit error
    By gandalf_bar in forum Linux Programming
    Replies: 1
    Last Post: 09-14-2005, 09:20 AM
  5. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 08:02 PM