Click here to Skip to main content
15,898,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStaticly linking MFC in VS2008 app produces compiling errors Pin
josip cagalj22-Mar-10 23:03
josip cagalj22-Mar-10 23:03 
AnswerRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
CPallini22-Mar-10 23:26
mveCPallini22-Mar-10 23:26 
GeneralRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
josip cagalj23-Mar-10 0:02
josip cagalj23-Mar-10 0:02 
GeneralRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
CPallini23-Mar-10 0:07
mveCPallini23-Mar-10 0:07 
GeneralRe: Staticly linking MFC in VS2008 app produces compiling errors [modified] Pin
josip cagalj23-Mar-10 0:31
josip cagalj23-Mar-10 0:31 
AnswerRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
KarstenK23-Mar-10 4:12
mveKarstenK23-Mar-10 4:12 
GeneralRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
josip cagalj23-Mar-10 4:51
josip cagalj23-Mar-10 4:51 
AnswerRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
Avi Berger23-Mar-10 6:02
Avi Berger23-Mar-10 6:02 
There are both MFC runtime libraries and the C++ runtime library.

The linker error messages appear to relate to the runtime library, not MFC. They look to me like the libs referenced expect the runtime library to be dynamically linked. At least some of them appear to be specific to debugging, which would explain why your later post indicates that these errors go away in your release build.

Note that there are problems if a DLL and and exe are linked to different versions of the runtime library and one tries to release dynamic memory allocated by the other.

josip cagalj wrote:
I didn't try to install re-distributable file on target machines.


Any dependencies of your program need to be included in your installation. The target machine may or may not have the appropriate versions of the MFC and runtime library dlls installed. This depends on the Windows version. It can also be impacted by service packs and other software installed on that machine.

josip cagalj wrote:
1>With Release version errors are:

1>FileVersion.obj : error LNK2001: unresolved external symbol __pgmptr
1>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
1>nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc


This sounds like an issue with the start-up code. Perhaps some sort of confusion between whether you are producing a console app or a GUI app?
Please do not read this signature.

GeneralRe: Staticly linking MFC in VS2008 app produces compiling errors Pin
josip cagalj23-Mar-10 21:37
josip cagalj23-Mar-10 21:37 
QuestionHow to convert Chinese Unicode string to ANSI multibyte? Pin
tmx22-Mar-10 22:56
tmx22-Mar-10 22:56 
AnswerRe: How to convert Chinese Unicode string to ANSI multibyte? Pin
Richard MacCutchan23-Mar-10 0:28
mveRichard MacCutchan23-Mar-10 0:28 
GeneralRe: How to convert Chinese Unicode string to ANSI multibyte? Pin
tmx24-Mar-10 21:47
tmx24-Mar-10 21:47 
QuestionReg MDI windows Explorer Pin
hellogany22-Mar-10 20:45
hellogany22-Mar-10 20:45 
AnswerRe: Reg MDI windows Explorer Pin
Richard MacCutchan22-Mar-10 22:16
mveRichard MacCutchan22-Mar-10 22:16 
AnswerRe: Reg MDI windows Explorer Pin
Adam Roderick J23-Mar-10 2:19
Adam Roderick J23-Mar-10 2:19 
GeneralRe: Reg MDI windows Explorer Pin
hellogany23-Mar-10 18:40
hellogany23-Mar-10 18:40 
GeneralRe: Reg MDI windows Explorer Pin
hellogany28-Mar-10 20:15
hellogany28-Mar-10 20:15 
QuestionGCC Linker and Where To Define Structures Pin
Trevor Johansen22-Mar-10 17:46
Trevor Johansen22-Mar-10 17:46 
AnswerRe: GCC Linker and Where To Define Structures Pin
CPallini22-Mar-10 21:55
mveCPallini22-Mar-10 21:55 
GeneralRe: GCC Linker and Where To Define Structures Pin
Trevor Johansen24-Mar-10 9:22
Trevor Johansen24-Mar-10 9:22 
GeneralRe: GCC Linker and Where To Define Structures Pin
CPallini24-Mar-10 11:33
mveCPallini24-Mar-10 11:33 
GeneralRe: GCC Linker and Where To Define Structures Pin
Trevor Johansen25-Mar-10 13:08
Trevor Johansen25-Mar-10 13:08 
GeneralRe: GCC Linker and Where To Define Structures Pin
CPallini25-Mar-10 21:41
mveCPallini25-Mar-10 21:41 
QuestionHow do you display a bitmap in IE and control navigation? Pin
nstein222-Mar-10 11:57
nstein222-Mar-10 11:57 
AnswerRe: How do you display a bitmap in IE and control navigation? Pin
KarstenK23-Mar-10 4:21
mveKarstenK23-Mar-10 4:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.