Link to home
Start Free TrialLog in
Avatar of MCofer
MCofer

asked on

How to create and Use a Common Function Lib

How do I access a function libaray in C++

I am creating  a MFC  DLL and LIB file of common functions I use across many projects

In VC6 using "C" I would do the following

I add the  project as a dependencie
extern "C" __declspec( dllexport ) int SetLayers (void);
__declspec( dllimport ) int SetLayers (void);

How should I do this using VS2003.net in C++ with a  MFC project
Avatar of millsoft
millsoft

You can do it the same way in VS2003.
If you've tried it and had problems please paste the code.
Avatar of MCofer

ASKER

Yes, the dllexport /dllimport works. But Insted of using old stype "C" methods I am wanting to Know if there is a BETTER way to do  the same in C++
maybe using typelibs?
ASKER CERTIFIED SOLUTION
Avatar of millsoft
millsoft

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MCofer

ASKER

Thanks
Too Easy

Can you point me at more Info on creating a COM OBJ LIB