somebody help me

This is a discussion on somebody help me within the C++ Programming forums, part of the General Programming Boards category; i just wanna know how can i run my exe file in other machine, when i write a program and ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Unhappy somebody help me

    i just wanna know how can i run my exe file in other machine, when i write a program and build it ,i can run its exe file just in my computer if i copy that exe file to another computer i doesn't work

  2. #2
    Hail to the king, baby. Akkernight's Avatar
    Join Date
    Oct 2008
    Location
    Faroe Islands
    Posts
    717
    I've had this problem too... When i think of it, maybe you need to compile it as 'release' instead of 'debug' but I dunno :P
    Currently research OpenGL

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,798
    Is this a release build or a debug build? What IDE/compiler are you using? Your chosen IDE may have installed specific runtime libraries (DLLs) that make your code work on your development machine. Unless the target machine has those runtime libraries installed on it as well (or unless you compile with specific options that disable calls to code specific to those runtime libraries), it will not work.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    There are several things that MAY affect this.

    Most important of all, any dependency of your .exe (such as DLL's) need to be on the other machine too. The debug libraries from Microsoft are not allowed to be distributed outside of those that have a license for the compiler, which may be solved by compiling a release version of the code.

    You may also have other packages that your code depends on that isn't on the other machine.

    And finally, you may be using functionality that the other machine doesn't have (e.g. using Vista Only functons on XP will not work).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    a newbie :p
    Join Date
    Aug 2008
    Location
    Zurich, Switzerland, Switzerland
    Posts
    90
    i don't think debug or release will give any effects on that...
    debug is bigger because it contains debugging info...not its dependency...
    and release version is a bit optimized....
    that's all...

    i agree with matsp said...

    to minimize its dependency, try to always use static library...

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21