Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling C++ Program with Visula Studio 6.0 for Multiple Windows Platforms

I am using Visual Studios v6.0 and have create a C++ program which runs on
my Window XP system. I want to also run the program on a computer with
Windows 98 installed. How can I compile the program on my Windows XP system
so that it will also run on the Windows 98 system? Is this dependent on
operating system version or the hardware? I have run into this problem
before and I had to compile the program on the Windows 98 system before it
would work. I don't have the compiler loaded on the Windows 98 system so I
would like to somehow compile using my Windows XP system. What are the
compiler settings to do this?

Thanks,
Tom




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-vir
us system (http://www.grisoft.com).
Version: 6.0.431 / Virus Database: 242 - Release Date: 12/17/2002
0 Kudos
Message 1 of 5
(3,476 Views)
What is the error when you compile your application on Windows XP and then run it on Windows 98? It's hard to say without knowing more about the error that you're getting, but I'm guessing that the error is because your application depends on a .dll that is installed by Visual Studio but is not installed by Windows 98, hence the application fails because of a missing dependency and not because it's running on Windows 98. One way that you could test this is copy the application to a Windows 98 machine that does not have Visual Studio installed, download Dependency Walker, run Dependency Walker on the .exe and see if it reports any missing dependencies. If so, the solution would be to install the dependency .dll(s) w
ith your .exe on the Windows 98 machine.

- Elton
0 Kudos
Message 2 of 5
(3,476 Views)
Thanks, I suspect you are correct about the dependecy. I tried to find all
dependecies using a different program but it lists quite a few of them. A
quick check revealed that all the same dlls existed on both machines. I'll
check it again just as soon as I get my machine with Win 98 operating again
(motherboard problems). I think the error was something to do with an
access violation and I was thinking it had something to do with the
importing the ADO library since the dependecy checking program I was using
at the time did not mention this to be a dependency.

- Tom


"Elton Wells" wrote in message
news:5065000000050000007DBF0000-1031838699000@exchange.ni.com...
> What is the error when you compile your application on Windows XP and
> then
run it on Windows 98? It's hard to say without knowing more
> about the error that you're getting, but I'm guessing that the error
> is because your application depends on a .dll that is installed by
> Visual Studio but is not installed by Windows 98, hence the
> application fails because of a missing dependency and not because it's
> running on Windows 98. One way that you could test this is copy the
> application to a Windows 98 machine that does not have Visual Studio
> installed, download
> href="http://www.dependencywalker.com/">Dependency Walker
, run
> Dependency Walker on the .exe and see if it reports any missing
> dependencies. If so, the solution would be to install the dependency
> dll(s) with your .exe on the Windows 98 machine.
>
> - Elton


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.434 / Virus Database: 243 - Release Date: 12/25/2002
0 Kudos
Message 3 of 5
(3,476 Views)
In article , tbruce@coserv.net
says...
> I am using Visual Studios v6.0 and have create a C++ program which runs on
> my Window XP system. I want to also run the program on a computer with
> Windows 98 installed. How can I compile the program on my Windows XP system
> so that it will also run on the Windows 98 system? Is this dependent on
> operating system version or the hardware? I have run into this problem
> before and I had to compile the program on the Windows 98 system before it
> would work. I don't have the compiler loaded on the Windows 98 system so I
> would like to somehow compile using my Windows XP system. What are the
> compiler settings to do this?
>
> Thanks,
> Tom
>
>
>
>
> ---
> Outgoing mail is
certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.431 / Virus Database: 242 - Release Date: 12/17/2002
>
>
>
This is only a guess, but if you're having a problem with running a
program on OS98 you compiled on OSXP you might have Unicode in your
program. OS98 isn't real savy with Unicode.

Of course you should take my thoughts with a grain of salt as I'm only
into chapter 4 of Horton's book on VC6++6.0 programming.
--
Jerry
http://www.toasty0.com
"Learn a new language and get a new soul."
--Czech proverb
0 Kudos
Message 4 of 5
(3,476 Views)
Usually this should work.
XP uses nearly the same rt-library's as w2k, as does NT4.
If it works in NT4, you can be assured that it also works in wME and w98
(and even in w95-OSR2, but NOT in w95-OSR1 though).

Be sure you do NOT develop/compile in UNICODE, while this isn't a problem in
all NT-platforms, it is in all w9x platforms.

You could be ensured by using the macro's "TEXT(xxx)" and "_T(xxx)" (where
'xxx' is some text) and use for all strings either LPCTSTR, LPTSTR or 'just'
CString. Better don't use 'char' or 'char*' directly, while this will be
implemented as Unicode if the compiler is in unicode-default.
If you're sure your compiler has been setup using Ansi-code (instead of
unicode) it shouldn't be a problem.
Also always compile using the A-library's and not using the W-library's
A=Ansi, W=Wide=Unicode)

--
\\\ | ///
( @.@ )
+-----------oOOo------(_)-----oOOo---------------+
Author of VCDwizard, get your copy at
http://www.labdv.com/vcdwizard/
Author of lkVCDimager, get your copy at
http://lkvcdimager.sourceforge.net/

"Tom Bruce" wrote in message
news:v0ga3ndk9ef778@corp.supernews.com...
> I am using Visual Studios v6.0 and have create a C++ program which runs on
> my Window XP system. I want to also run the program on a computer with
> Windows 98 installed. How can I compile the program on my Windows XP
system
> so that it will also run on the Windows 98 system? Is this dependent on
> operating system version or the hardware? I have run into this problem
> before and I had to compile the program on the Windows 98 system before it
> would work. I don't have the compiler loaded on the Windows 98 system so
I
> would like to somehow compile using my Windows XP system. What are the
> compiler settings to do this?
>
> Thanks,
> Tom
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.431 / Virus Database: 242 - Release Date: 12/17/2002
>
>
0 Kudos
Message 5 of 5
(3,476 Views)