Click here to Skip to main content
15,916,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Program self upgrade Pin
lisoft11-Nov-06 2:43
lisoft11-Nov-06 2:43 
QuestionIn Context Menu "Application Focus is lost " Pin
pgirish10-Nov-06 3:23
pgirish10-Nov-06 3:23 
AnswerRe: In Context Menu "Application Focus is lost " Pin
Rage10-Nov-06 4:40
professionalRage10-Nov-06 4:40 
QuestionStrange error with overloaded function name Pin
Mr.Brainley10-Nov-06 2:45
Mr.Brainley10-Nov-06 2:45 
AnswerRe: Strange error with overloaded function name Pin
Chris Meech10-Nov-06 3:06
Chris Meech10-Nov-06 3:06 
GeneralRe: Strange error with overloaded function name Pin
Mr.Brainley10-Nov-06 3:25
Mr.Brainley10-Nov-06 3:25 
GeneralRe: Strange error with overloaded function name Pin
Chris Meech10-Nov-06 6:29
Chris Meech10-Nov-06 6:29 
AnswerRe: Strange error with overloaded function name Pin
Blake Miller10-Nov-06 3:37
Blake Miller10-Nov-06 3:37 
This one is going to make you laugh Laugh | :laugh: and cry Sigh | :sigh: ...

In the Microsoft headers, there are TWO definitions for almost every function - the ANSI version and the UNICODE version. The AddJob in the Microsoft headers is redefined as either AddJobA or AddJobW. The precompiler will see any similar text and change the name.

Now, in your static library, you must NOT have included anything close to the printer header, so the AddJob stayed as 'AddJob', but in your project, when you went to use it, and maybe you directly or indirectly included the files which redefined AddJob, so it did not find AddJobA or AddJobW in your library at link time - your project's main OBJ module was looking for the wrong name.

I had been tripped up by this one time a while back as well. You have to be careful naming anything requiring linkage the same as any one of the bazillion WIN32 functions out there!

This would also explain why once you changed the name your 'problem' went away.


Any sufficiently gross incompetence is nearly indistinguishable from malice.

GeneralRe: Strange error with overloaded function name Pin
Mr.Brainley10-Nov-06 4:17
Mr.Brainley10-Nov-06 4:17 
GeneralRe: Strange error with overloaded function name Pin
Rage10-Nov-06 4:37
professionalRage10-Nov-06 4:37 
QuestionLoading menu in dialog box. in WIN32 application. Pin
Aryan S10-Nov-06 2:38
Aryan S10-Nov-06 2:38 
AnswerRe: Loading menu in dialog box. in WIN32 application. Pin
Hamid_RT10-Nov-06 2:59
Hamid_RT10-Nov-06 2:59 
QuestionDynamic array of String class Pin
priyank_ldce10-Nov-06 2:09
priyank_ldce10-Nov-06 2:09 
AnswerRe: Dynamic array of String class Pin
toxcct10-Nov-06 2:14
toxcct10-Nov-06 2:14 
GeneralRe: Dynamic array of String class [modified] Pin
Mr.Brainley10-Nov-06 2:23
Mr.Brainley10-Nov-06 2:23 
GeneralRe: Dynamic array of String class Pin
David Crow10-Nov-06 2:25
David Crow10-Nov-06 2:25 
GeneralRe: Dynamic array of String class Pin
Mr.Brainley10-Nov-06 2:31
Mr.Brainley10-Nov-06 2:31 
GeneralRe: Dynamic array of String class Pin
priyank_ldce10-Nov-06 3:40
priyank_ldce10-Nov-06 3:40 
GeneralRe: Dynamic array of String class Pin
David Crow10-Nov-06 3:48
David Crow10-Nov-06 3:48 
GeneralRe: Dynamic array of String class Pin
priyank_ldce10-Nov-06 3:53
priyank_ldce10-Nov-06 3:53 
GeneralRe: Dynamic array of String class Pin
David Crow10-Nov-06 4:00
David Crow10-Nov-06 4:00 
GeneralRe: Dynamic array of String class Pin
priyank_ldce10-Nov-06 4:04
priyank_ldce10-Nov-06 4:04 
GeneralRe: Dynamic array of String class Pin
Mark Salsbery10-Nov-06 4:50
Mark Salsbery10-Nov-06 4:50 
QuestionHow to use CreateProcessAsUser Pin
StefanKittel10-Nov-06 2:06
StefanKittel10-Nov-06 2:06 
Questionhi all !!! Pin
Bravoone_200610-Nov-06 1:20
Bravoone_200610-Nov-06 1:20 

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.