Click here to Skip to main content
15,913,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PopUp Menu Disabled in ActiveX Pin
javi_jmc3-May-05 12:26
javi_jmc3-May-05 12:26 
GeneralRe: PopUp Menu Disabled in ActiveX Pin
Anonymous3-May-05 13:43
Anonymous3-May-05 13:43 
GeneralLNK2005 Error (not CRT or MFC library) Pin
ricecake3-May-05 4:10
ricecake3-May-05 4:10 
GeneralRe: LNK2005 Error (not CRT or MFC library) Pin
eli150219793-May-05 4:16
eli150219793-May-05 4:16 
GeneralRe: LNK2005 Error (not CRT or MFC library) Pin
ricecake3-May-05 4:36
ricecake3-May-05 4:36 
GeneralRe: LNK2005 Error (not CRT or MFC library) Pin
Bob Stanneveld3-May-05 4:58
Bob Stanneveld3-May-05 4:58 
GeneralRe: LNK2005 Error (not CRT or MFC library) Pin
ricecake3-May-05 5:26
ricecake3-May-05 5:26 
GeneralRe: LNK2005 Error (not CRT or MFC library) Pin
QuiJohn3-May-05 6:27
QuiJohn3-May-05 6:27 
The problem was that your #ifdefs only protect against the header being included multiple times from the same source file. Since it is being included multiple places in your project, std::ostream& operator<< is getting defined multiple places, and therefore compiled into many different .OBJ files. The linker does not like this when it tries to tie it all together.

When you separate the header and implementation, the CPP file with the function definition gets compiled only once, so the linker is happy.
GeneralRe: LNK2005 Error (not CRT or MFC library) Pin
Bob Stanneveld3-May-05 21:52
Bob Stanneveld3-May-05 21:52 
GeneralMemory Allocation over 64k Pin
Cambalindo3-May-05 4:10
Cambalindo3-May-05 4:10 
GeneralRe: Memory Allocation over 64k Pin
Zdeslav Vojkovic3-May-05 5:38
Zdeslav Vojkovic3-May-05 5:38 
GeneralRe: Memory Allocation over 64k Pin
David Crow3-May-05 5:40
David Crow3-May-05 5:40 
GeneralRe: Memory Allocation over 64k Pin
QuiJohn3-May-05 9:29
QuiJohn3-May-05 9:29 
GeneralOffice Automation - Catching MS Word Keyboard events Pin
Noman Altaf3-May-05 4:03
Noman Altaf3-May-05 4:03 
GeneralXML Pin
viliam3-May-05 3:55
viliam3-May-05 3:55 
GeneralHiTooltip for CToolBar Pin
includeh103-May-05 3:48
includeh103-May-05 3:48 
GeneralCHM File Format Pin
RajaniBhandari3-May-05 2:48
RajaniBhandari3-May-05 2:48 
GeneralRe: CHM File Format Pin
ThatsAlok3-May-05 21:13
ThatsAlok3-May-05 21:13 
GeneralRe: CHM File Format Pin
Joel Lucsy4-May-05 13:41
Joel Lucsy4-May-05 13:41 
GeneralVirtual memory Allocation Pin
ckkmohan3-May-05 2:47
ckkmohan3-May-05 2:47 
GeneralRe: Virtual memory Allocation Pin
Tim Smith3-May-05 3:37
Tim Smith3-May-05 3:37 
GeneralVirtual memory Allocation Pin
3-May-05 2:47
suss3-May-05 2:47 
GeneralBlank SDI/MDI Pin
pc_dev3-May-05 2:22
pc_dev3-May-05 2:22 
GeneralRe: Blank SDI/MDI Pin
David Crow3-May-05 5:43
David Crow3-May-05 5:43 
GeneralRe: Blank SDI/MDI Pin
Anonymous12-May-05 23:07
Anonymous12-May-05 23:07 

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.