programming help

Discussion in 'C' started by vivekipe, Jun 10, 2011.

  1. vivekipe

    vivekipe New Member

    Joined:
    Jun 10, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    is there a way to make c program executable in other pc that doesnt have c
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Yes. Exe files are meant to be doing exactly that.
     
  3. kupparamakrishna

    kupparamakrishna New Member

    Joined:
    Jun 23, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Location:
    banglore
    it is not possible
     
  4. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    Don't comment on wrongly on things you are not sure of.
     
  5. gpk kishore

    gpk kishore New Member

    Joined:
    Jun 30, 2011
    Messages:
    82
    Likes Received:
    0
    Trophy Points:
    0
    what sir(shabbir) had told is correct

    we can run executable files in other pc's without c compiler

    I have done it
     
  6. anuvab1911

    anuvab1911 New Member

    Joined:
    Jun 19, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    But some do not work.I created a graphics program in C++ and it doesn't work in another PC which doesn't have C++ installed
     
  7. anuvab1911

    anuvab1911 New Member

    Joined:
    Jun 19, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Sorry that was C not C++
     
  8. eriyer

    eriyer New Member

    Joined:
    Jan 22, 2011
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    0
    C or C++ program - that's immaterial!

    Did you create (compile) your program in Windows - if so, the program may be dependent on DLLs. If the DLLs are missing in the target system (the computer on which you are trying to run the EXE) OR the DLLs are not in the path your program will not execute. It may also be that DLL is present in the target system but may be a lower version and does not have the function that is called in your program.

    There is a program called 'pedump' which is available with the source (which is rather advanced) and the compiled EXE (pedump.exe) as a free download from:
    http://www.wheaty.net/downloads.htm (look for tag Updated Pedump)

    Just run pedump with your EXE as command line argument (I am assuming it is compiled with some windows compiler like Vc++ or BorlandC++ or gcc for windows) in the console window:

    pedump <mygraphicprogram.exe>

    It will list many things - look for the heading Imports Table - all the DLLs your program needs will be listed!


    Hope this helps!!
     
  9. imported_Bhavani

    imported_Bhavani New Member

    Joined:
    Jul 2, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    chennai
    if we have an compiler and an editor ie (IDE) then we can compile and execute the program and a EXE file will be created and if we copy tat exe file and run on the other systems then it might work provided if we have an TURBO c compiler..just try it:)
     
  10. eriyer

    eriyer New Member

    Joined:
    Jan 22, 2011
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    0
    To my knowledge Turbo C is meant ONLY for MS-DOS (I dont think a Windows version is available - you have Borland C++ for windows). The Turbo C libraries are all static libraries. When your program invokes a function like printf() the full binary code for printf() is copied from the static library and included with your EXE - therefore you dont need Turbo C on the target system to run your EXE. Only the processor and OS of the target system should be compatible.

    On the other hand even basic Windows functions like MessageBox() ,CreateWindow() which are invoked in your windows programs are not included with your EXE - only the references to these functions and the DLLs which contain these functions are included in your EXE header in the 'Imports Table' which I have mentioned in an earlier thread.
     
  11. kupparamakrishna

    kupparamakrishna New Member

    Joined:
    Jun 23, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    student
    Location:
    banglore
    i'm sorry but please correct your english and put it in a polite way
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice