C++ Express 2008 programs don't work on XP?

This is a discussion on C++ Express 2008 programs don't work on XP? within the C++ Programming forums, part of the General Programming Boards category; I created a simple program using C++ Express 2008 on my Vista laptop. But when I run the program on ...

  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    28

    C++ Express 2008 programs don't work on XP?

    I created a simple program using C++ Express 2008 on my Vista laptop. But when I run the program on an XP computer, I get an error saying the configuration is wrong. Is there some way to compile the program on my laptop so that it works on an XP computer?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    You need to install the 2008 version of the C runtime library.

    This is one place you can get that:
    http://www.microsoft.com/downloads/d...displaylang=en

    --
    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.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    2,388
    Quote Originally Posted by edomingox View Post
    I created a simple program using C++ Express 2008 on my Vista laptop. But when I run the program on an XP computer, I get an error saying the configuration is wrong. Is there some way to compile the program on my laptop so that it works on an XP computer?
    you need to create an installer project and install the program on your xp machine so that it copies over the runtime dlls to the right folders.

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,583
    You do not need a setup project. It is merely a convenience.
    All you need are those runtime files. A setup project will typically automatically install it if missing.
    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
    Sep 2008
    Posts
    28
    I'll download that redistribution package. But I noticed that when I remove the "include manifest" option in the linker, it worked.

    I tried downloading the redistro pack and it just placed a bunch of files in my d: drive. but where do they really belong, in what directory. I also downloaded the redistro pack SP1 but it didn't place any files where the first one did.

    I've never made an install project. That I would have to get more info on how to do.

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    You can link the C/C++ libraries statically !!!
    http://www.kalmbach-software.de/scre...StaticLinkCRT/

    If you develop/compile your application under Vista but want it to run even on XP:

    targetver.h
    Code:
    #pragma once
    
    // Die folgenden Makros definieren die mindestens erforderliche Plattform. Die mindestens erforderliche Plattform
    // ist die früheste Windows-, Internet Explorer-Version usw., die über die erforderlichen Features zur Ausführung
    // Ihrer Anwendung verfügt. Die Makros aktivieren alle Funktionen, die auf den Plattformversionen bis
    // einschließlich der angegebenen Version verfügbar sind.
    
    // Ändern Sie folgende Definitionen für Plattformen, die älter als die unten angegebenen sind.
    // Unter MSDN finden Sie die neuesten Informationen über die entsprechenden Werte für die unterschiedlichen Plattformen.
    #pragma once
    
    #ifndef WINVER
    #define WINVER 0x0501
    #endif
    
    #ifndef _WIN32_WINNT
    #define _WIN32_WINNT 0x0501
    #endif
    
    #ifndef _WIN32_WINDOWS
    #define _WIN32_WINDOWS 0x0410
    #endif
    
    #ifndef _WIN32_IE
    #define _WIN32_IE 0x0600
    #endif
    Greetz
    Greenhorn

  7. #7
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Good tip, Greenhorn__ I was about to add a totally non-contributing comment since the question seems to have been answered. VC++ 2008 Express works on XP. I actually don't recall needing to install anything to do so, however I am usually pretty good about keeping my runtimes current.

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    I also use VC9 on XP. But with the SDK, that comes up with VS2008, not all libs are working.
    For Example, the scrnsave.lib, so I had to replace the library from SDK 6.0a with the one from the Server SDK 2003.
    It's good to have the ISO from the Win Server SDK 2003 SP1 on the HD ...

    Greetz

  9. #9
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    See! THAT is exactly why I say to download the ISO instead of the self-installer.

  10. #10
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,583
    Erm, it only indicates the Visual Studio 2008 SDK is messed up and the platform sdk is not.
    And if you download the real runtime from Microsoft, it will install files into proper directories and register them. You cannot simply copy these dlls to another machine to make it work.
    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.

  11. #11
    Registered User
    Join Date
    Jul 2008
    Posts
    66
    Oh no, I mean that if I install VS2008 under XP I can't compile a Screensaver when the build target is WINVER 0x0501.

    To do so, I have to replace the scrnsave.lib (which is for Vista) with the version from the Win Server SDK 2003, cause this library version don't have the additional Functions which are in the version from SDK 6.0a ...

    So, if you use VS2008 on XP and for XP, then it's recommended to have the files from the Win Server SDK 2003 on the right hand ...

    Greetz

  12. #12
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    You can make different build rules to accomplish this task without needing to "replace" physical files, by the way. But yeah I know its an added step. But that is no more work than needing logic embedded into a makefile.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 11:39 AM
  2. Does reading file with fstream not work on xp?
    By pinkcheese in forum C++ Programming
    Replies: 13
    Last Post: 04-11-2002, 08:39 AM
  3. Will Dev-C++ work with XP?
    By Unregistered in forum C++ Programming
    Replies: 3
    Last Post: 03-30-2002, 10:48 PM
  4. Replies: 6
    Last Post: 01-07-2002, 01:46 AM
  5. ClipCursor() in XP - Dam it dont work!!
    By (TNT) in forum Windows Programming
    Replies: 0
    Last Post: 11-11-2001, 09:05 AM

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