Go Back   FileForums > Off Topic > Software
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-01-2007, 08:15
Muji-FightR's Avatar
Muji-FightR Muji-FightR is offline
Registered User
 
Join Date: Apr 2005
Location: beyond belief
Posts: 766
Thanks: 0
Thanked 0 Times in 0 Posts
Muji-FightR is on a distinguished road
Send a message via ICQ to Muji-FightR Send a message via Yahoo to Muji-FightR
Red face MFC8 grmbl

Heya,
I lately started having a look at C++ again, now I finally managed to find something worth coding and I have some strange problems with that goddamn MFC and the MSVCR.

Coding is fine and it compiles and runs on my comp properly.
I then gave the app to some dudes via ICQ and IRC and it didn't run for about 9/10 of them :/
The problem seems to be up to the manifest that the compiler adds to the exe:
Quote:
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
If I remove the VC80.MFC entry it says it can't find mfc80.dll, well I copied the dll from the VStudio redist folder to system32 and it works.
But if I also remove the VC80.CRT dependency it crashes with an error message like "unable to start blah 0x80000003".
I debugged the app and I stopped at a DebugBreak() probably inside the Windows Loader's actions.
It seems to load the MSVCR8.DLL but after DLLInit the DLL returns a string similar to "[...] trying to load msvcr8.dll in an inaccurate way. [...] exit".

Why is that ? What is the assembly needed for ? I always thought an Import table entry for the DLL is enough :/

I found out how to 'fix' the problem, I simply bound the whole static MFC library to the app, making it 3 times as big x(

Is there any other way to ensure compatible with most Windows version ?
Reply With Quote
Sponsored Links
  #2  
Old 04-01-2007, 04:40
Quall999's Avatar
Quall999 Quall999 is offline
Registered User
 
Join Date: Jun 2002
Location: In a garbage can, like Oscar
Posts: 3,361
Thanks: 0
Thanked 20 Times in 4 Posts
Quall999 is on a distinguished road
What version of Visual Studio are you using?

The file you are talking about is a manifest to the .net CLR libraries. If you are using (or including) anything that is part of the CLR library, then the manifest will be created. You can remove the CLR library options from your project, but anything .net related and probably (dunno for sure) GUI related will no longer be supported.

If you want to remove CLR (and required manifest), go into the properties of the project and set the Common Language Runtime support to "none" (probably found in the general tab).

If you don't want to have to lug around the mfc80.dll, then you can include it statically by changing the Use/Include MFC option to "statically", or something along the lines of that. It's also usually found in the general tab. Your exe will become much bigger, but you won't have to give it with your program in seperate files.
__________________
--v1.0 [COLOR=Gray]case modded[/COLOR] Xbox with a [COLOR=DarkGreen]160gb[/COLOR] HDD upgrade[URL="irc://irc.efnet.net/fileforums"] [/URL]

Last edited by Quall999; 04-01-2007 at 04:44.
Reply With Quote
  #3  
Old 04-01-2007, 05:52
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,836
Thanks: 20
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
I'm not sure what exactly you're trying to do but I'm not going to waste either time or money to buy or install or use such monolithic dinosaurs!

For developing my own Unix-style pipe stages, I'm using MinGW - Minimalist GNU for Windows (the downloads are confusing; install this for a not-so-recent but properly working-out-of-the-box release!), which is about 30-50 Megabytes, has no IDE of its own, and programs compiles with it use the MSVCRT.DLL rather than a custom one (see CYGWIN1.DLL for CygWin). I think, with proper libraries, it should be able to compile graphical stuff, too. (Or, if it doesn't, use CygWin instead.) I'm sure a graphical IDE also exists for these.

Just an idea...
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
  #4  
Old 04-01-2007, 13:16
Muji-FightR's Avatar
Muji-FightR Muji-FightR is offline
Registered User
 
Join Date: Apr 2005
Location: beyond belief
Posts: 766
Thanks: 0
Thanked 0 Times in 0 Posts
Muji-FightR is on a distinguished road
Send a message via ICQ to Muji-FightR Send a message via Yahoo to Muji-FightR
@Quall999: Not sure if you read my post lol
Anyway, I'm using VS2005 or VS 8 (Pro), dunno what it's actually called.
And it's not some C++ .NET nor does it have anything to do with the CLR, not at all, plain simple C++

And I removed the CLR support, that's what I first thought, too so i removed it instantly :/

As I said, binding the whole MFC is not my intention, well I'd do it if there's no other solution, but I think there has to be one ?

@Joe
I think it is an alternative, however I'm a very crappy coder and I'm not even able to properly work with Windows messages and all that, I simply use the MFC handlers such as OnClick etc
So I'm not really able to work with something rather complicated for a newb with about 1 month of coding experience
Nevertheless thanks for the suggestion
Reply With Quote
  #5  
Old 04-01-2007, 17:56
Quall999's Avatar
Quall999 Quall999 is offline
Registered User
 
Join Date: Jun 2002
Location: In a garbage can, like Oscar
Posts: 3,361
Thanks: 0
Thanked 20 Times in 4 Posts
Quall999 is on a distinguished road
oops, I missed the last few lines of your post, probably the most important ones lol.

If you use any MFC library functions, you will either need to bring a copy of the mfc80 dll along with the app, or include it statically like you tried. Your only alternative would be to do what Joe suggested and find an alternative api for events (or gui items). I personally use wxwidgets, but that can get large as well.
__________________
--v1.0 [COLOR=Gray]case modded[/COLOR] Xbox with a [COLOR=DarkGreen]160gb[/COLOR] HDD upgrade[URL="irc://irc.efnet.net/fileforums"] [/URL]
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -7. The time now is 06:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com