Click to See Complete Forum and Search --> : How do you statically link MFC dll if you didnt use the vc7 wizard?


Mike Pliam
October 14th, 2002, 02:42 PM
I plan to port a number of projects from VC6.0 to VC7.0. I would like to avoid installation complexities at the expense of a larger executable footprint.

Question: Having sucessfully ported from VC6.0 to VC7.0, how does one then designate static linking in 7.0 (I know you can set static linking in the Wizard, but that step was bypassed when the legacy code was converted.)

Thanks for any help that might be out there

Mike:D

Jesper A
October 16th, 2002, 01:15 PM
Open up the tab ClassView.Right click the projektname
on top of the tree.In the popupmenu choose properties.
In "configuration properties" choose General and
in the field to the right there is one called "Use of MFC"
there is a listbox to it, open it and choose "Use MFC in a Static Library". Rebuild.
Hope this helped and that it was what you were looking for.

Mike Pliam
October 16th, 2002, 02:29 PM
Jesper,

That is EXACTLY what I was looking for.

Thankyou for taking the time to answer.

I did notice that my ported VC6.0 program which had been statically linked to MFC was still linked statically in VC7.0. But while the program runs ok on NT4.0, the program will not run on Win95 (asks for OLEACC.DLL which is a NT dll, and when that is provided, RTerrors that it cannot open it.)

I guess this is what Microsoft means when they say the Win95 is no longer supported ??

Jesper A
October 16th, 2002, 03:14 PM
:) Good to hear!Mostly I need other peoples help.
It ainīt anyday that ones can give something back.

andibaciu
November 28th, 2002, 04:12 AM
Hey ... i have some problems ... i make an application (MFC) in a static library. On my system (Win XP) it works ok, but on Win 9x didn't work .... i receive some errors and application didn't start.
Coud anybody help me and explain me why?
I wait an explication...

Andi

Jesper A
November 28th, 2002, 10:51 AM
This may not be your problem but if you donīt link
statically to mfc I ran in to the problem that win 9x
misses MFC70.dll.So you can either link mfc statically
to your app or pass the proper dll:s with your app.
I would like you to be more specific to what messages you
got and what project you have done.

andibaciu
November 29th, 2002, 04:06 AM
i make a MFC Dialog Based application with MFC static library not MFC linked dll and when i load in Depends to see what dll loads when application start, and when i start default profile in Depends, my application crash after load xptheme.dll (i dont know if theme loads or not).
When i run application on my computer (i have XP istaled) it's work fine ... but i run application on windows 98 he dont start.
Error code is something like this:

TRAFICMONITOR caused an invalid page fault in
module TRAFICMONITOR.EXE at 0167:00410aaa.
Registers:
EAX=00757d28 CS=0167 EIP=00410aaa EFLGS=00010217
EBX=bff776f7 SS=016f ESP=00757cf8 EBP=00758044
ECX=3fffe357 DS=016f ESI=015f7cd0 FS=85c7
EDX=ffffffff ES=016f EDI=015f8000 GS=0000
Bytes at CS:EIP:
f3 a5 8b ca 83 e1 03 f3 a4 5f 5e 59 c2 08 00 90
Stack dump:
007599e4 015f0a30 00000000 0043212e 00757d28 ffffffff 007599e4 0075870c 00758044 bff55836 01572737 3d767d84 015f0d60 015f0a30 00000000 00000000

this is the error message....

Please say me what to do ... where i wrong?
Is something wrong with xptheme?
Win 98 dont have something like that ... what to do to don't loat theme .... ????

Thanks in advance......

Jesper A
November 29th, 2002, 05:57 AM
This is more than I know.But that dll file
xptheme.dll is that one created and linked by
you or is it a part of the winXP.If itīs part of the
WinXP my wild guess is that you use some
MFC code that win98 doesnīt support.
But again this is just my guess. Iīm sorry
I canīt help you with this.I suggest you
ask this question in the Visual C++ forum
there seems to be more active users there....