Subj : Re: Creating dll To : borland.public.cpp.borlandcpp From : JaimeS Date : Thu Jul 15 2004 10:47 am Hi To export a class from a DLL you need to put the __declspec(dllexport) in the class, for example class __declspec(dllexport) TRList { ... }; and in your code that use the class in the DLL, you neet to import the class: class __declspec(dllimport) TRList { ... }; A good idea is to use a conditional #define to ensure that in the DLL you are exporting the class, and in your code you are importing the class: #ifdef MYDLL #define MYDLL_EXPORT __declspec(dllexport) #else #define MYDLL_EXPORT __declspec(dllimport) #endif and declare the class in this form: class MYDLL_EXPORT TRList { }; in the DLL project the only thing that you need to do is declare a preprocessor variable with the option -D MYDLL_EXPORT JaimeS "Itay" wrote in message news:40f67b55@newsgroups.borland.com... > > MyProject is quite big ( lot's of files), the problem is that compiling > takes a lot of time. > I want to transform some of my files into dll's so I won't have to compile > to hole project. > I have a Unit (MyUnit) inside that unit there is class - class myClass : > public myFather > (myFather is a part of myProject ) > i want to be able to create an object from myClass. and to use all the > public functions. > I have tried to use the dll wizard but i couldnt export that class. > where can i get an exemple of how to export a class. what do i need to > include and where. > > Thank you. > Itay > > .