Click here to Skip to main content
16,011,482 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Printer Selection Pin
Tomasz Sowinski13-Sep-01 4:46
Tomasz Sowinski13-Sep-01 4:46 
GeneralGet ActiveX size !!! Pin
Hadi Rezaee12-Sep-01 23:36
Hadi Rezaee12-Sep-01 23:36 
GeneralHeader file to Library ... Pin
Hadi Rezaee12-Sep-01 23:34
Hadi Rezaee12-Sep-01 23:34 
GeneralRe: Header file to Library ... Pin
Steen Krogsgaard13-Sep-01 0:07
Steen Krogsgaard13-Sep-01 0:07 
GeneralRe: Header file to Library ... Pin
Hadi Rezaee13-Sep-01 0:31
Hadi Rezaee13-Sep-01 0:31 
GeneralRe: Header file to Library ... Pin
Steen Krogsgaard13-Sep-01 1:38
Steen Krogsgaard13-Sep-01 1:38 
GeneralRe: Header file to Library ... Pin
Hadi Rezaee13-Sep-01 2:55
Hadi Rezaee13-Sep-01 2:55 
GeneralRe: Header file to Library ... Pin
Steen Krogsgaard13-Sep-01 3:04
Steen Krogsgaard13-Sep-01 3:04 
You still need to include the .h file in your project. Think of it this way: To use a class you need two things: a declaration and an implementation. The declaration usually goes into the .h file, and the implementation usually goes into the .cpp file. When the compiler compiles the source code where you use your class it has to know how the class is *declared* but not how it is *implemeneted*. When all .cpp files of your project has been compiled, the linker makes sure that all the references to your class is resolved - i.e. all the pointers to your class' member variables and methods have valid values. To do this the linker needs to know the addresses of the methods, and this is dependent on the implementation. So, the linker has to know the implementation of your class. If the class is implemented in a .cpp file included in your project then the linking information is available already. However, if your class is implemented in a DLL the linker needs to get this info from somewhere - and this somewhere is your .lib file. The .lib file contains a list of all the (exported) classes and their methods, along with the relative addresses of these methods. Now the linker can do its job and all's well.
So, the compiler needs to know the declaration - you have to include the .h file. The linker needs to know the implementation - you have to put the .lib file in the lib path.

Cheers
Steen.

"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
GeneralRe: Header file to Library ... Pin
Hadi Rezaee13-Sep-01 4:04
Hadi Rezaee13-Sep-01 4:04 
GeneralRe: Header file to Library ... Pin
Steen Krogsgaard13-Sep-01 4:12
Steen Krogsgaard13-Sep-01 4:12 
GeneralRe: Header file to Library ... Pin
Hadi Rezaee13-Sep-01 4:45
Hadi Rezaee13-Sep-01 4:45 
QuestionHow can I run my application before password in win98 Pin
12-Sep-01 22:29
suss12-Sep-01 22:29 
AnswerRe: How can I run my application before password in win98 Pin
Michael Dunn12-Sep-01 22:36
sitebuilderMichael Dunn12-Sep-01 22:36 
GeneralI hopethe pwd dialog display after my application end! Pin
12-Sep-01 23:12
suss12-Sep-01 23:12 
GeneralAutomatic Radio Buttons Pin
Derek Lakin12-Sep-01 22:20
Derek Lakin12-Sep-01 22:20 
GeneralRe: Automatic Radio Buttons Pin
Tomasz Sowinski13-Sep-01 1:51
Tomasz Sowinski13-Sep-01 1:51 
GeneralRe: Automatic Radio Buttons Pin
Derek Lakin13-Sep-01 2:02
Derek Lakin13-Sep-01 2:02 
GeneralRe: Automatic Radio Buttons Pin
Tomasz Sowinski13-Sep-01 2:17
Tomasz Sowinski13-Sep-01 2:17 
GeneralRe: Automatic Radio Buttons Pin
Derek Lakin13-Sep-01 2:21
Derek Lakin13-Sep-01 2:21 
Generalhelp with MSXML Pin
12-Sep-01 22:10
suss12-Sep-01 22:10 
GeneralRe: help with MSXML Pin
Michael Dunn12-Sep-01 22:30
sitebuilderMichael Dunn12-Sep-01 22:30 
GeneralRe: help with MSXML Pin
12-Sep-01 22:53
suss12-Sep-01 22:53 
GeneralRe: help with MSXML Pin
markkuk13-Sep-01 1:39
markkuk13-Sep-01 1:39 
GeneralRe: help with MSXML Pin
13-Sep-01 1:49
suss13-Sep-01 1:49 
GeneralRe: help with MSXML Pin
Erik Thompson13-Sep-01 8:36
sitebuilderErik Thompson13-Sep-01 8:36 

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.