Thread: Deploying C Application: Help!

  1. #1
    Registered User
    Join Date
    Dec 2007
    Location
    Vancouver BC
    Posts
    4

    Deploying C Application: Help!

    I've developed a C application and can't figure out how to coax Visual Studio 2005 to give me a deployable .exe.

    Details: The program is pure ANSI C (K-R). It uses one .h file as well as many of the ANSI standard libraries. It interacts with windows only with "printf", "fprintf" and binary read C commands.
    OS: WinXPPro
    Challenge: The C program works great on the machine on which I developed it. But when I move the .exe file to another XPPro machine (with all .net libraries but not Visual Studio) it won't even load.
    Tried so far: I've tried to follow the MSDN "How to deploy project" pages but it wants DDL files etc. If I simply skip those steps the result still won't load on another XPPro machine.

    I'm obviously missing something but I have clue what it is. I need help. Thanks.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You need to have the target machine install the 2005 runtime. There's one for SP1, too. Are you using SP1?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by Elysia View Post
    You need to have the target machine install the 2005 runtime. There's one for SP1, too. Are you using SP1?
    You should not need a runtime of any kind for a straight C console program.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Visual Studio 2005 needs runtime to be installed as opposed to just placed in a folder, as with previous versions. After all, the C code lies in libraries itself, and I doubt it's possible to install even those without the installer. It would work on 2003-, but not 2005 unfortunately.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Location
    Vancouver BC
    Posts
    4

    Clarification

    I'm using WinXPPro with SP2. All the latest Windows updates have been installed. I was confused about runtime environments as well. I, too, thought that wasn't an issue with a pure C program.

    If I have to add some kind of runtime environment when I ask Visual Studio 2005 to compile it, how do I do that? I see no options or controls to make a "runtime environment" or "target machine" happen?

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Updating Windows with all latest security updates is just asking for trouble
    But what I asked is whether you've installed service pack 1 for Visual Studio 2005?
    Unfortunately, the Express version doesn't offer Setup projects so it's impossible to generate the runtime file. You simply have to download it. I have a VS2005 SP1 download link handy, though.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cleanup of the application...
    By Petike in forum Windows Programming
    Replies: 1
    Last Post: 08-16-2008, 05:23 PM
  2. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  3. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 04:33 AM
  4. Win application not very portable
    By swed in forum Windows Programming
    Replies: 5
    Last Post: 10-01-2001, 11:17 AM