|
Make sure the libraries you've linked with, both explicitly and implicitly, are present on the target machine.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You may have other problems, but you definitely need static linking.
Go to project->settings
Click on the general tab
Select "use MFC in a static library"
press OK
Select build->rebuild all
|
|
|
|
|
malaugh wrote: but you definitely need static linking.
Why would you suggest this, when it's obvious that he has built a 'debug' version of the application? The problem is the 'debug' DLLs are not present, nor should they be, on the target machine.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Exactly my point. If you use static linking, then you can run the program on the other machine without the other machine needing the DLLs, just copy across the exe.
|
|
|
|
|
malaugh wrote: If you use static linking, then you can run the program on the other machine without the other machine needing the DLLs, just copy across the exe.
One of the most common problems with statically linked DLLs is that the version of MFC they linked with assumed a latest-version of some other DLL, and when that DLL is not installed, either their program can't load, or if it does, it ends up with the wrong version of the other DLL and crashes or otherwise malfuctions. Common controls, Common Dialogs, and OLE are the most common points of mismatch. And there's nothing that can be done other than doing a proper install.
There are about a dozen versions of MFC42.DLL, and while most of them are backward compatible, you cannot link something with a modern MFC42.DLL and expect it to work with an older one. MFC is rarely the key problem; a new version of MFC42.LIB assumes contemporary versions of a lot of other DLLs, such as common controls, OLE, COM, etc. and therefore static linking has done nothing other than increase the DLL size but not solve any problems; and you cannot use such a DLL with any MFC executable anyway, so it doesn't do any good for distributing DLLs.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I'm not sure why static linking is usually the suggested solution to this problem
Static linking is not always desired, and in many instances impossible (eg MFC extension DLLs).
Properly deploying an application is (IMO) necessary.
It's documented... Deployment (C++)[^]
Mark
|
|
|
|
|
Can anyone tell me is it possible in Visual Studio to add an icon to system menu that would call a dialog box?
On the other hand I could set up a mnemonic that would work throughout the whole application to call a particular dialog box.
If anyone knows what i am talking about and knows of any way to help please answer.
Thanks
P.S this is for a college project i am doing and want to add in this extra function.
Jenn (HelpME)
-- modified at 5:20 Friday 19th January, 2007
|
|
|
|
|
JennK wrote: contact me via email @ jonnysmonny@hotmail.com
NO !
if you're not patient enough to ask in a forum and wait for the answer, find a chat.
when someone answers your question, you'll get automatically notified by email by CodeProject...
all you can get by providing publically your email address is that someone get it to spam you. it's up to you to edit your message and remove the email.
|
|
|
|
|
toxcct wrote: it's up to you to edit your message and remove the email.
That wouldn't help, now that you have quoted it
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: That wouldn't help, now that you have quoted it
I know, he has to be scared about it !
|
|
|
|
|
JennK wrote: Can anyone tell me is it possible in Visual Studio to add an icon to system menu that would call a dialog box?
Yes, it's possible.
JennK wrote: On the other hand I could set up a mnemonic that would work throughout the whole application to call a particular dialog box.
Yes, you can do that, too.
JennK wrote: alternatively contact me via email @ jonnysmonny@hotmail.com
That probably won't happen.
JennK wrote: P.S this is for a college project i am doing and want to add in this extra function.
Take my advice. If it's for a programming class project, don't add anything more than the instructor wants. He doesn't have time to wade through extra crap, and is generally only interested in whether or not you understand the concept(s) contained within the assignment.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
It has to be at a very high standard it's my third year project and i really would like to add this in. Can I have a mnemonic without having a menu bar? The mnemonic would call a dialog.
I could just create a button on every dialog linking to that dialog and change it to a bitmap or something but i'd prefer to do it the other way.
Jenn
|
|
|
|
|
If you create an MFC application via ClassWizard (Ctrl+W), you can see how this is done with the About dialog.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am nearing towards the end of my project do you know if i can still do it.
|
|
|
|
|
Sure. Why would a project's end be a factor?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sorry, I said that because i meant i couldn't restart to create the project differently. I suppose i want to know is it possible to set up a mnemonic that will operate throughout the project to call a particular dialog box???
|
|
|
|
|
JennK wrote: i couldn't restart to create the project differently.
Who said anything about restarting the project or creating it differently?
JennK wrote: I suppose i want to know is it possible to set up a mnemonic that will operate throughout the project to call a particular dialog box???
Yes. They are called accelerator keys (which are often times confused with mnemonics).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Ok great sorry for the confusion... So do you know how to use accelerator keys???
|
|
|
|
|
JennK wrote: So do you know how to use accelerator keys???
Yes. Search for LoadAccelerators() and TranslateAccelerator() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks! I'll have a go at it then cheers...
|
|
|
|
|
Hi
I have used many times calloc().But this time it is going fail.
What may be the reason when calloc() fails(return bad pointer)
Thanx
manu
|
|
|
|
|
are you coding in C or C++ ?
|
|
|
|
|
It MUST be C++ as this is the Visual C++ / MFC board
|
|
|
|
|
here is a scoop : The Visual C++ compiler also compiles C code !
|
|
|
|
|
Here's another scoop.
This is the C++/MFC board, C questions do not belong here.
So it's irrelevant whether the VC++ compiler can compile C code.
|
|
|
|