Can't run MFC app on NT 
Author Message
 Can't run MFC app on NT

A co-worker built a small Visual C++ 5.0 app using
the "static" MFC libraries. It uses the normal
windowing GUI stuff and some comm (TAPI) port stuff.

The app runs on a system with Visual C/C++ 5.0 installed,
but just goes away on an NT system that does not have
Visual C 5.0 installed (one had 4.0, the other none).

With a "static" build, I thought that you wouldn't need
to distribute any .DLL's. (The app went from about 32K
in size to 285K in size when we switched to "static"
build).

Any ideas?



Mon, 31 Jul 2000 03:00:00 GMT  
 Can't run MFC app on NT

Did you build an MFC exe from the beginning in dev studio?



Mon, 31 Jul 2000 03:00:00 GMT  
 Can't run MFC app on NT

Quote:
>Did you build an MFC exe from the beginning in dev studio?

No, his first build used the DLL, it was about 32K in size.
After switching to "static" build, the program ended up
about 285K in size. I assumed that this meant that all
required MFC libraries were included in his EXE.


Mon, 31 Jul 2000 03:00:00 GMT  
 Can't run MFC app on NT

Does the app use any OCX's? - if so, they need to be installed.



Quote:

> >Did you build an MFC exe from the beginning in dev studio?

> No, his first build used the DLL, it was about 32K in size.
> After switching to "static" build, the program ended up
> about 285K in size. I assumed that this meant that all
> required MFC libraries were included in his EXE.



Mon, 31 Jul 2000 03:00:00 GMT  
 Can't run MFC app on NT

Quote:

>The app runs on a system with Visual C/C++ 5.0 installed,
>but just goes away on an NT system that does not have
>Visual C 5.0 installed (one had 4.0, the other none).

Another thought just occurred to me. I have noticed that if you create
a shortcut to an EXE and run it from the shortcut, the system will
tell you if the EXE can't find any needed DLLs (it's akin to a similar
trick you used to be able to do with Program Manager years ago).

Bob Moore [MVP]

-----------------------------------------------------------------
Due to an unreasonable amount of queries, I no
longer answer emailed questions. Sorry.
-----------------------------------------------------------------



Tue, 01 Aug 2000 03:00:00 GMT  
 Can't run MFC app on NT

Quote:
>>The app runs on a system with Visual C/C++ 5.0 installed,
>>but just goes away on an NT system that does not have
>>Visual C 5.0 installed (one had 4.0, the other none).

The problem is related to MFC comm port functions. Standard
windows stuff is working, just not the comm port stuff
(TAPI). I think the name of one similar demo is VCTERM.CPP

Another 'C' based sample (TTY.C), that does not use MFC,
does run OK.



Tue, 01 Aug 2000 03:00:00 GMT  
 Can't run MFC app on NT

I'm not sure the "static" link of MFC in any way forces a static link
of the C runtime library, MSVCRT[D].DLL
                                joe



Quote:
>A co-worker built a small Visual C++ 5.0 app using
>the "static" MFC libraries. It uses the normal
>windowing GUI stuff and some comm (TAPI) port stuff.

>The app runs on a system with Visual C/C++ 5.0 installed,
>but just goes away on an NT system that does not have
>Visual C 5.0 installed (one had 4.0, the other none).

>With a "static" build, I thought that you wouldn't need
>to distribute any .DLL's. (The app went from about 32K
>in size to 285K in size when we switched to "static"
>build).

>Any ideas?

Joseph M. Newcomer

http://www3.pgh.net/~newcomer


Thu, 03 Aug 2000 03:00:00 GMT  
 Can't run MFC app on NT

Quote:

> A co-worker built a small Visual C++ 5.0 app using
> the "static" MFC libraries. It uses the normal
> windowing GUI stuff and some comm (TAPI) port stuff.

> The app runs on a system with Visual C/C++ 5.0 installed,
> but just goes away on an NT system that does not have
> Visual C 5.0 installed (one had 4.0, the other none).

> With a "static" build, I thought that you wouldn't need
> to distribute any .DLL's. (The app went from about 32K
> in size to 285K in size when we switched to "static"
> build).

> Any ideas?

   There is a bug in Visual C++ that does not link all necessary
libraries to statical linked MFC appliactions in debug mode.  There is a
knowledge base article on it but I don't remember the details.  I kinda
doubt this is your problem however, because I believe that results in a
message box of some sort.  (Can't load dll, or some such.)

Andy K.



Fri, 04 Aug 2000 03:00:00 GMT  
 Can't run MFC app on NT

Quote:
>> A co-worker built a small Visual C++ 5.0 app using
>> the "static" MFC libraries. It uses the normal
>> windowing GUI stuff and some comm (TAPI) port stuff.

>> The app runs on a system with Visual C/C++ 5.0 installed,
>> but just goes away on an NT system that does not have
>> Visual C 5.0 installed (one had 4.0, the other none).

>...There is a bug in Visual C++ that does not link all...

Turns out it's related to the comm port stuff. We tried
building a non-comm related sample and it runs OK.
I had a post about this earlier, but maybe it was lost.


Fri, 04 Aug 2000 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. MFC App Wizard-generated database application runs like a dog under NT 4.0

2. Problem: MFC App running as an NT Service

3. Statically Linked MFC app (VC 7.1) won't run from CD

4. MFC app won't run on 80486

5. How to change MFC app 's previlige under NT

6. What's different between MFC App and MFC App as NTService

7. MFC, ODBC app run under NT Service 'stalls'

8. problem running MFC v4.0 ODBC app on MFC v4.2 machine

9. out of memory problems when running app on NT

10. Converting app to run as NT Service?

11. Focus problem in Win16 app running in Windows NT 4.0

12. HELP - NT SysTray Clock Hangs when changing time and background threads running in my app

 

 
Powered by phpBB® Forum Software