• Advertisement
Sign in to follow this  

lib and dll usage

This topic is 4889 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i want some articles about lib and dll files usage. how can i make them, what is the rules, how can i make a function that will be called from lib, bla bla... i search google again and again but cant find any good one. can you recommend a good book or article/tutorial for this?? Thank you..

Share this post


Link to post
Share on other sites
Advertisement
when I look for information about DLLs etc like this it only ever seems to refer to global scope variables or functions. How do you export classes and their member functions?

Share this post


Link to post
Share on other sites
Quote:
Original post by BigBadBob
when I look for information about DLLs etc like this it only ever seems to refer to global scope variables or functions. How do you export classes and their member functions?

VC++:

#ifdef YOURDLL_OR_LIB_NAME_EXPORTS
#define DLL_INTERFACE __declspec(dllexport)
#else
#define DLL_INTERFACE __declspec(dllimport)
#endif

DLL_INTERFACE class ClassName {
// declare members
};



The your-dll-or-lib-name_EXPORTS symbol will be generated by the IDE. So export/import of classes works exactly the same as with functions and data.

Regards,
Pat.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement